Skip to content

hs3city/kronos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kronos

"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.

Functionalities:

📆 read events from the Discord channel and generate event subpages to be posted on the hs3.pl website

How to run the script locally?

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!

  1. Note that the script is in the automations/kronos subdirectory. The following steps should be executed there.

  2. 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
    
  3. Install required packages

    pip install -r requirements.txt
    
  4. 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 😉)

  5. Create a .env file in the KRONOS main directory

    DISCORD_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

  6. Run the app

    python bot.py
    
  7. If script succeeded, the subpages were generated in the hs3.pl repository in your current directory.

  8. If you want to make a commit with up to date events, follow the contributing guildelines in the hs3.pl repo.

About

My, my, look at the time!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •  

Languages