"My, my, look at the time!" ⏱
This script is used to read/write various information from the Hackerspace Trójmiasto's Discord channel and hs3.pl website. It can be run by the GitHub Action Update calendar local in hs3.pl GitHub Actions tab.
📆 read events from the Discord channel and generate event subpages to be posted on the hs3.pl website
Python 3.9 or greater is needed. If you'd like to learn more, I recommend discord.py documentation - a great source of knowledge about using Python for Discord!
-
Note that the script is in the
automations/kronossubdirectory. The following steps should be executed there. -
Using a virtual environment is recommended.
# Create a virtual environment python -m venv venv # Activate the virtual environment # On Windows venv\Scripts\activate # On macOS and Linux source venv/bin/activate -
Install required packages
pip install -r requirements.txt -
Get a Discord HS3 bot access token from one of the hackerspace's members (hint: your best bet are members who contribute to this repo 😉)
-
Create a
.envfile in the KRONOS main directoryDISCORD_TOKEN=<your_discord_token> HS3_REPO=<path to the root folder of your local hs3.pl website repo*>*or any other directory where you want the event files to be generated
-
Run the app
python bot.py -
If script succeeded, the subpages were generated in the
hs3.plrepository in your current directory. -
If you want to make a commit with up to date events, follow the contributing guildelines in the hs3.pl repo.