This is the code for the PyLadies advent, a Twitter bot that posts a resource everyday during December.
Tips and resources to tweet can be added to the CSV in src/data/advent_data.csv
. In PyLadies Berlin google sheets there is an online copy of this which can be downloaded.
This project has been written using Python 3.9, the easiest way to run it locally is to create a virtual env using venv and run all the commands within the virtual environment.
python3.9 -m venv venv
venv\Scripts\activate
# or on linux
source venv/bin/activate
deactivate
# after activating the virtual env
pip install -r requirements.txt
Copy the .env.template
file and rename it to .env
add your secrets here. These values will then be loaded as environment variables and used to create a config object in the config package.
python src/main.py
This project is linted using both Black and Pycodestyle. Both can be installed locally and ran with the following commands.
black .
pycodestyle .
Use autopep8 to automatically lint the code.
autopep8 --in-place --aggressive --aggressive .\script_name.py
Configuration for pycodestyle can be found in the ./setup.cfg
file. The linters will also run as github actions when code is pushed to Github.
This github repo is connected to the PyLadies Berlin Heroku account, new versions are automatically deployed from the main
branch when code is pushed there. The Heroku Scheduler runs the code once per day.
This project is under the MIT creative commons license. It's code has been influenced, inspired and in parts taken from the project Named After Men by Tai Linhares.