Skip to content

Commit

Permalink
Add 2024 variant
Browse files Browse the repository at this point in the history
Also move constants to bot.env
  • Loading branch information
ApsiV11 committed Oct 2, 2024
1 parent 2017173 commit 4db58ae
Show file tree
Hide file tree
Showing 8 changed files with 674 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Install dependencies
run: pip install -r requirements.txt && pip install pylint
- name: Run pylint
run: pylint vaalilakanabot2023.py
run: pylint vaalilakanabot2024.py
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.10-slim

LABEL version="2021" \
LABEL version="2024" \
description="Vaalilakanabot" \
org.opencontainers.image.source="https://github.com/fyysikkokilta/vaalilakanabot"

Expand All @@ -9,6 +9,6 @@ COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

COPY assets ./assets
COPY vaalilakanabot2023.py vaalilakanabot2023.py
COPY vaalilakanabot2024.py vaalilakanabot2024.py

CMD ["python3", "vaalilakanabot2023.py"]
CMD ["python3", "vaalilakanabot2024.py"]
24 changes: 24 additions & 0 deletions bot.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#Telegram bot token of the bot
VAALILAKANABOT_TOKEN=

#Telegram's numeric chat id of the admin chat
ADMIN_CHAT_ID=

#Base URL of the Discource server
BASE_URL=

#Full URL of the JSON file of the Discource introduction area
#Example: https://fiirumi.fyysikkokilta.fi/c/vaalipeli-2024/esittelyt/l/latest.json
TOPIC_LIST_URL=

#Full URL of the JSON file of the Discource questions area
#Example: https://fiirumi.fyysikkokilta.fi/c/vaalipeli-2024/kysymykset/l/latest.json
QUESTION_LIST_URL=

#All roles in the board, separated by a comma
#If some role contains a space, wrap the roles inside quotation marks
BOARD=

#All other elected roles, separated by a comma
#If some role contains a space, wrap the roles inside quotation marks
OFFICIALS=
2 changes: 1 addition & 1 deletion data/example_channels.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[129198779, 103954310]
[]
2 changes: 1 addition & 1 deletion data/example_fiirumi_posts.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"15": {"id": 15, "title": "Alueesta Vaalipeli 2019: esittele itsesi!", "slug": "alueesta-vaalipeli-2019-esittele-itsesi"}}
{}
2 changes: 1 addition & 1 deletion data/example_question_posts.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"16": {"id": 16, "title": "Alueesta Vaalipeli 2019: esit\u00e4 kysymyksi\u00e4!", "slug": "alueesta-vaalipeli-2019-esita-kysymyksia"}}
{}
2 changes: 1 addition & 1 deletion data/example_vaalilakana.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Puheenjohtaja": [{"name": "Patrik Lahti", "position": "Puheenjohtaja", "fiirumi": "https://fiirumi.fyysikkokilta.fi/t/patrik-lahti-puheenjohtajaksi-2020-for-president-2020/59", "valittu": true}], "Varapuheenjohtaja": [], "Rahastonhoitaja": [], "Fuksikapteeni": [], "IE": [], "Hupimestari": [], "Viestint\u00e4vastaava": [], "Kv-vastaava": [], "Yrityssuhdevastaava": [], "Opintovastaava": [], "ISOvastaava": [], "Jatkuvuustoimikunnan puheenjohtaja": [], "Excumestari": [], "Lukkarimestari": [], "Kvantin p\u00e4\u00e4toimittaja": []}
{"Puheenjohtaja": [], "Varapuheenjohtaja": [], "Rahastonhoitaja": [], "Fuksikapteeni": [], "IE": [], "Hupimestari": [], "Viestint\u00e4vastaava": [], "Kv-vastaava": [], "Yrityssuhdevastaava": [], "Opintovastaava": [], "ISOvastaava": [], "Jatkuvuustoimikunnan puheenjohtaja": [], "Excumestari": [], "Lukkarimestari": [], "Kvantin p\u00e4\u00e4toimittaja": []}
Loading

0 comments on commit 4db58ae

Please sign in to comment.