You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.2 KiB
Markdown

2 months ago
# Gardening
2 months ago
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.
2 months ago
### 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:
2 months ago
* On macOS and Linux:
source bin/activate
2 months ago
* On Windows:
.\Scripts\activate
2 months ago
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](https://imagemagick.org/script/install-source.php)
2 months ago
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.
2 months ago
## 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.
2 months ago
## 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