397a49adaa | 6 months ago | |
---|---|---|
website | 6 months ago | |
README.md | 6 months ago | |
app.py | 6 months ago | |
config.json | 6 months ago | |
dependencies.txt | 6 months ago |
README.md
Gardening
This script generates static digital gardens. The system processes files to generate a simple HTML page, which can then be served locally or in a server for viewing.
Prerequisites
Python 3.x installed on your machine.
Steps to Run the Project
Clone the Repository:
git clone https://git.xpub.nl/poni/gardening.git
cd gardening
Create a Virtual Environment:
python3 -m venv .
Activate the Virtual Environment:
-
On macOS and Linux:
source bin/activate
-
On Windows:
.\Scripts\activate
Install Imagemagick:
-
On macOS:
-
Install HomeBrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install Imagemagick:
brew install imagemagick
-
On Windows: follow this
Install Dependencies:
pip3 install -r dependencies.txt
Generate the HTML File
- Add files you want to show in the digital garden to 'website/content/garden/'
- Edit the header and the footer markdown files in 'website/content/misc/'
- Edit, if you want, the config.json file to edit the name of the garden and the colors of the website.
Then launch:
python3 app.py
This script reads the 'website/content/garden/' contents, compress media, converts it to HTML, applies styles, and integrates it into a complete HTML structure.
Test it running un a Local Server:
cd website
python3 -m http.server
Open a web browser and go to http://localhost:8000 to view your digital garden.
UPDATE YOUR WEBSITE!
If you add or remove contents from your folders or if you edit the config.json file, you have to relaunch the app.py script in order to update the generated code.
PUT IT ONLINE!
Just add the whole 'website/' folder in your server. Don't you know how to do it? Contact me! i will give you some advice -> poni @ habitattt . it
Further
If you delete some or upload new files from the garden folder, re-run the code and it will update itself.
If you want to embed a video or a track from other websites, just copy the embedding options from there and paste it in a .txt file inside the garden folder.
This is hyper-beta. Suggestions are really welcomed! Write to -> poni @ habitattt . it