{"id":23983701,"url":"https://github.com/tomasbedrich/xcontest-cashier","last_synced_at":"2025-10-26T10:33:27.157Z","repository":{"id":37698871,"uuid":"301526601","full_name":"tomasbedrich/xcontest-cashier","owner":"tomasbedrich","description":"Starting fee Telegram watcher based on XContest.org.","archived":false,"fork":false,"pushed_at":"2025-04-09T06:22:28.000Z","size":1444,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T07:26:57.574Z","etag":null,"topics":["flying","paragliding","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomasbedrich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tomasbedrich"}},"created_at":"2020-10-05T20:05:39.000Z","updated_at":"2025-04-09T06:22:26.000Z","dependencies_parsed_at":"2023-10-12T15:44:17.795Z","dependency_job_id":"0da98d6c-8b3c-4797-85f1-831d5f852df8","html_url":"https://github.com/tomasbedrich/xcontest-cashier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbedrich%2Fxcontest-cashier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbedrich%2Fxcontest-cashier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbedrich%2Fxcontest-cashier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasbedrich%2Fxcontest-cashier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasbedrich","download_url":"https://codeload.github.com/tomasbedrich/xcontest-cashier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837178,"owners_count":21169379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flying","paragliding","telegram-bot"],"created_at":"2025-01-07T12:28:24.878Z","updated_at":"2025-10-26T10:33:22.122Z","avatar_url":"https://github.com/tomasbedrich.png","language":"Python","funding_links":["https://github.com/sponsors/tomasbedrich"],"categories":[],"sub_categories":[],"readme":"# xcontest-cashier\nWatch flights uploaded to [World XContest](https://www.xcontest.org/world/cs/) paragliding league\nfor purpose of checking whether the pilot paid a starting fee.\n\n## Environment variables\nYou can use `.env` file.\n\n### Required\n- `APP_TELEGRAM_BOT_TOKEN`: A Telegram bot token generated using [@BotFather](https://t.me/botfather).\n- `APP_TELEGRAM_CHAT_ID`: A group chat ID for bot to operate on ([A guide to find it out](https://stackoverflow.com/a/32572159/570503)).\n- `APP_FIO_API_TOKEN`: A Fio bank access token generated using their [internet banking](https://ib.fio.cz/ib/login).\n- `APP_MONGO_CONNECTION_STRING`: A [connection string](https://docs.mongodb.com/manual/reference/connection-string/) to a Mongo instance.\n- `APP_XCONTEST_USERNAME`: XContest username used for fetching flights.\n- `APP_XCONTEST_PASSWORD`: XContest password.\n\n### Optional\nIn form `KEY=default`:\n- `APP_SENTRY_DSN`: [Sentry](https://sentry.io/) error reporting access token. If empty, error reporting is turned off.\n- `APP_SENTRY_ENVIRONMENT=production`: For Sentry to distinguish `dev` or `production`, which may have impact on alerting etc.\n- `APP_TRANSACTION_WATCH_CRON=0 * * * *`: [Cron pattern](https://crontab.guru/) for running transaction watch task.\n- `APP_FLIGHT_WATCH_CRON=0 20 * * *`: Cron pattern for running flight watch task.\n- `APP_RUN_TASKS_AFTER_STARTUP=false`: Whether to run cron tasks immediately after startup or wait for a next cron trigger.\n- `APP_FLIGHT_WATCH_DAYS_BACK=30`: How many days to the past to look for uploaded flights (positive number!). Making this value higher gives more time to pilots to pay starting fee before marking the flight as offending.\n- `APP_USER_AGENT=...`: User agent to use for XContest HTTP calls.\n- `APP_LIVENESS=/tmp/liveness`: A path to liveness probe touch file.\n- `APP_LIVENESS_SLEEP=20`: How often to touch a liveness probe (in seconds).\n- `APP_MONGO_DATABASE=default`: A Mongo database name used for the app.\n\n## Local development\nCreate a `.env` file according to this example:\n```dotenv\n# required\nAPP_TELEGRAM_BOT_TOKEN=...\nAPP_TELEGRAM_CHAT_ID=...\nAPP_FIO_API_TOKEN=...\nAPP_MONGO_CONNECTION_STRING=mongodb://root:root@mongo:27017\nAPP_XCONTEST_USERNAME=...\nAPP_XCONTEST_PASSWORD=...\n\n# optional\nAPP_TRANSACTION_WATCH_CRON=\"* * * * *\"\nAPP_FLIGHT_WATCH_CRON=\"*/10 * * * *\"\nAPP_RUN_TASKS_AFTER_STARTUP=true\nAPP_FLIGHT_WATCH_DAYS_BACK=39  # adjusted for development purposes - to fit some day when people were flying\n\n# mongo - see docker-compose.yaml\nMONGO_INITDB_ROOT_USERNAME=root\nMONGO_INITDB_ROOT_PASSWORD=root\nME_CONFIG_MONGODB_ADMINUSERNAME=root\nME_CONFIG_MONGODB_ADMINPASSWORD=root\n```\n\nThen run:\n```shell script\ndocker-compose build\ndocker-compose run cashier\n```\n\n## Deployment\nSee `deploy.sh`.\n**BEWARE** that the script is tailored for a custom server (`chown`s a specific username), but it's easy to update it.\n\n### Requirements\n- SSH access to a Linux machine.\n- Docker + docker-compose installed.\n- `.env` set up.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasbedrich%2Fxcontest-cashier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasbedrich%2Fxcontest-cashier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasbedrich%2Fxcontest-cashier/lists"}