Skip to content

Automation of the process of publishing events from the D.S.D.A. Blue Suede Shoes website.

License

Notifications You must be signed in to change notification settings

DSDA-Blue-Suede-Shoes/event-publisher

Repository files navigation

Event Publisher

This project strives to automate the process of publishing events from the D.S.D.A. Blue Suede Shoes website (events page) to several platforms. Notably, the various Google Calendars for different dance styles and danszusjes.nl, Unilife, and Facebook.

The project is in reasonable usability and documentation state, but not super robust against errors.

Technical note
Firefox is used as platform for the web automations by Selenium. Have it installed, or change the settings and get the driver for the browser you want.

Setting up

Get a Python environment, e.g. a virtual one:

python -m venv ./venv

Install the requirements

pip install -r requirements.txt

Get the authentication information for the various platforms. Likely an existing config can mostly be reused by someone else.

  • Google Calendar: Get credentials as explained here. Get a credentials.json file, rename to google_api_credentials.json.
  • Unilife: Email address and password in credentials.json.
  • Facebook:
    • Email address, password, and two-factor authentication info (OTP)
    • A token for the Graph API. See "Before You Start" on the getting started page.
      This token must be transformed to a long-lived (page) token. This can be done with the get_long_lived_token function in facebook_adapter.py. For this you also need the Facebook app id and secret.
    • These also in credentials.json.

Example credentials.json

{
  "FACEBOOK_ID": "",
  "FACEBOOK_PASSWORD": "",
  "FACEBOOK_TOTP": "",
  "UNILIFE_ID": "",
  "UNILIFE_PASSWORD": "",
  "FACEBOOK_GRAPH_API_TOKEN": "",
  "FACEBOOK_APP_ID": "",
  "FACEBOOK_APP_SECRET": ""
}

How to use

Run the Python program.

./venv/Scripts/activate
python main.py

The terminal will guide you through the process.

About

Automation of the process of publishing events from the D.S.D.A. Blue Suede Shoes website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages