diff --git a/module/track.py b/module/track.py index bbb2e1b..7b8ad8d 100644 --- a/module/track.py +++ b/module/track.py @@ -3,18 +3,28 @@ from typing import Any from toldwords.pretalx import Pretalx, Submission, Talk -from toldwords.utils import DATA2023 import setting from models.trackdb import TalkFavsDB, TrackDB +PRETALX_SETTING = { + '2023': { + 'domain': 'pretalx.coscup.org', + 'event': 'coscup-2023', + }, + '2024': { + 'domain': 'pretalx.coscup.org', + 'event': 'coscup-2024', + } +} + class Track: ''' Track ''' def __init__(self, pid: str) -> None: - DATA2023['token'] = setting.PRETALX_API_KEY - self.pretalx = Pretalx(**DATA2023) + PRETALX_SETTING[pid]['token'] = setting.PRETALX_API_KEY[pid] + self.pretalx = Pretalx(**PRETALX_SETTING[pid]) self.submissions: list[Submission] self.talks: list[Talk] self.pid = pid diff --git a/poetry.lock b/poetry.lock index c8a76b0..69e9157 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1869,22 +1869,22 @@ testing = ["google-api-core (>=1.31.5)"] [[package]] name = "protobuf" -version = "5.27.2" +version = "5.27.3" description = "" optional = false python-versions = ">=3.8" files = [ - {file = "protobuf-5.27.2-cp310-abi3-win32.whl", hash = "sha256:354d84fac2b0d76062e9b3221f4abbbacdfd2a4d8af36bab0474f3a0bb30ab38"}, - {file = "protobuf-5.27.2-cp310-abi3-win_amd64.whl", hash = "sha256:0e341109c609749d501986b835f667c6e1e24531096cff9d34ae411595e26505"}, - {file = "protobuf-5.27.2-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:a109916aaac42bff84702fb5187f3edadbc7c97fc2c99c5ff81dd15dcce0d1e5"}, - {file = "protobuf-5.27.2-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:176c12b1f1c880bf7a76d9f7c75822b6a2bc3db2d28baa4d300e8ce4cde7409b"}, - {file = "protobuf-5.27.2-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:b848dbe1d57ed7c191dfc4ea64b8b004a3f9ece4bf4d0d80a367b76df20bf36e"}, - {file = "protobuf-5.27.2-cp38-cp38-win32.whl", hash = "sha256:4fadd8d83e1992eed0248bc50a4a6361dc31bcccc84388c54c86e530b7f58863"}, - {file = "protobuf-5.27.2-cp38-cp38-win_amd64.whl", hash = "sha256:610e700f02469c4a997e58e328cac6f305f649826853813177e6290416e846c6"}, - {file = "protobuf-5.27.2-cp39-cp39-win32.whl", hash = "sha256:9e8f199bf7f97bd7ecebffcae45ebf9527603549b2b562df0fbc6d4d688f14ca"}, - {file = "protobuf-5.27.2-cp39-cp39-win_amd64.whl", hash = "sha256:7fc3add9e6003e026da5fc9e59b131b8f22b428b991ccd53e2af8071687b4fce"}, - {file = "protobuf-5.27.2-py3-none-any.whl", hash = "sha256:54330f07e4949d09614707c48b06d1a22f8ffb5763c159efd5c0928326a91470"}, - {file = "protobuf-5.27.2.tar.gz", hash = "sha256:f3ecdef226b9af856075f28227ff2c90ce3a594d092c39bee5513573f25e2714"}, + {file = "protobuf-5.27.3-cp310-abi3-win32.whl", hash = "sha256:dcb307cd4ef8fec0cf52cb9105a03d06fbb5275ce6d84a6ae33bc6cf84e0a07b"}, + {file = "protobuf-5.27.3-cp310-abi3-win_amd64.whl", hash = "sha256:16ddf3f8c6c41e1e803da7abea17b1793a97ef079a912e42351eabb19b2cffe7"}, + {file = "protobuf-5.27.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:68248c60d53f6168f565a8c76dc58ba4fa2ade31c2d1ebdae6d80f969cdc2d4f"}, + {file = "protobuf-5.27.3-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:b8a994fb3d1c11156e7d1e427186662b64694a62b55936b2b9348f0a7c6625ce"}, + {file = "protobuf-5.27.3-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:a55c48f2a2092d8e213bd143474df33a6ae751b781dd1d1f4d953c128a415b25"}, + {file = "protobuf-5.27.3-cp38-cp38-win32.whl", hash = "sha256:043853dcb55cc262bf2e116215ad43fa0859caab79bb0b2d31b708f128ece035"}, + {file = "protobuf-5.27.3-cp38-cp38-win_amd64.whl", hash = "sha256:c2a105c24f08b1e53d6c7ffe69cb09d0031512f0b72f812dd4005b8112dbe91e"}, + {file = "protobuf-5.27.3-cp39-cp39-win32.whl", hash = "sha256:c84eee2c71ed83704f1afbf1a85c3171eab0fd1ade3b399b3fad0884cbcca8bf"}, + {file = "protobuf-5.27.3-cp39-cp39-win_amd64.whl", hash = "sha256:af7c0b7cfbbb649ad26132e53faa348580f844d9ca46fd3ec7ca48a1ea5db8a1"}, + {file = "protobuf-5.27.3-py3-none-any.whl", hash = "sha256:8572c6533e544ebf6899c360e91d6bcbbee2549251643d32c52cf8a5de295ba5"}, + {file = "protobuf-5.27.3.tar.gz", hash = "sha256:82460903e640f2b7e34ee81a947fdaad89de796d324bcbc38ff5430bcdead82c"}, ] [[package]] @@ -2571,13 +2571,13 @@ test = ["pytest", "ruff"] [[package]] name = "toldwords" -version = "0.8.1" +version = "0.8.2" description = "Using ChatGPT to make keywords for the papers from COSCUP." optional = false -python-versions = ">=3.9,<4.0" +python-versions = "<4.0,>=3.9" files = [ - {file = "toldwords-0.8.1-py3-none-any.whl", hash = "sha256:68409bdb76a3fb6ccc2ef0e0002b80b4ba387b0d5beedd13c608e73b32357e32"}, - {file = "toldwords-0.8.1.tar.gz", hash = "sha256:33939cdb1f6ae2749265364039abaee54c4edaafbd0be612eff0c5e3c6cc03a9"}, + {file = "toldwords-0.8.2-py3-none-any.whl", hash = "sha256:ecef31497b1fff653e299bd86ff5d790f39060bf0bb28fee280306d17ec5b64d"}, + {file = "toldwords-0.8.2.tar.gz", hash = "sha256:27bf8d77c58a356b39e3ab8c0067315076cfb347431e76e87cf139fec569bafa"}, ] [package.dependencies]