{"id":23596521,"url":"https://github.com/abjugard/aocslacker-python","last_synced_at":"2025-06-11T13:34:13.467Z","repository":{"id":266347244,"uuid":"897835596","full_name":"abjugard/AoCSlacker-Python","owner":"abjugard","description":"A new era is dawned 🎄😎","archived":false,"fork":false,"pushed_at":"2024-12-11T07:21:06.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T20:43:28.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/abjugard.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}},"created_at":"2024-12-03T10:21:07.000Z","updated_at":"2024-12-11T07:21:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"480f13f4-13ad-4134-a2fe-944d923e7722","html_url":"https://github.com/abjugard/AoCSlacker-Python","commit_stats":null,"previous_names":["abjugard/aocslacker-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abjugard%2FAoCSlacker-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abjugard%2FAoCSlacker-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abjugard%2FAoCSlacker-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abjugard%2FAoCSlacker-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abjugard","download_url":"https://codeload.github.com/abjugard/AoCSlacker-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239441677,"owners_count":19639122,"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":[],"created_at":"2024-12-27T10:12:52.299Z","updated_at":"2025-02-18T08:47:10.686Z","avatar_url":"https://github.com/abjugard.png","language":"Python","readme":"# AoCSlacker-Python\n\nNotify Slack channel with Advent of Code leaderboard, now in glorious Python in true AoC spirit!\n\n## Setup\nEither install the dependancies (`pip install -r requirements.txt`) globally \non the machine you intend to run on, or perform the following steps to \ninitialise a Python virtual environment:\n\n* `python -m venv venv`\n* `source venv/bin/activate`\n* `pip install -r requirements.txt`\n\nThen tweak your SystemD unit to use this virtual environment, e.g.\n\n```systemd\n[Unit]\nDescription=AoCSlacker-Python\nAfter=network-online.target\n\n[Service]\nUser=lowprivuser\nGroup=lowprivuser\nType=oneshot\nWorkingDirectory=/opt/aocslacker-python/src\nExecStart=/opt/aocslacker-python/venv/bin/python bot.py\nTimeoutStartSec=120s\nTimeoutStopSec=120s\nKillMode=process\nKillSignal=SIGINT\n\n[Install]\nWantedBy=multi-user.target\n```\n\n## Crontab\nCrontab syntax to run every Monday at 12:00\n\n```bash\n# m h  dom mon dow   command\n0 12 * * 1 AOC_SESSION='xyz' AOC_LEADERBOARD_ID='xxxxx' AOC_YEAR='xxxx' SLACK_WEBHOOK_URL='https://hooks.slack.com/services/xxx/xxx/xxx' /usr/bin/python /path/to/aocslacker-python/src/bot.py\n```\n\n## systemd\nCopy and modify `AoCSlacker-Python.service.example` to `AoCSlacker-Python.service`\nand hardlink it to your systemd unit library. Copy and modify\n`AoCSlacker-Python.timer.example` to `AoCSlacker-Python.timer` and hardlink it to your\nsystemd unit library. Run `systemctl edit AoCSlacker-Python.service` and insert:\n\n```\n[Service]\nEnvironment=AOC_YEAR=\u003cAoC contest year\u003e (not necessary, will default to current year)\nEnvironment=AOC_LEADERBOARD_ID=\u003cleaderboard ID\u003e\nEnvironment=AOC_SESSION=\u003cAoC session cookie\u003e\nEnvironment=SLACK_WEBHOOK_URL=\u003cSlack webhook URL\u003e\n```\n\nFinally run `systemctl enable --now AoCSlacker-Python.timer`\n\n## Example output\n\n### Total\n\n```md\nLeaderboard 2024: Top {count, max 25} as of 10:55:29 - https://adventofcode.com/{aoc_year}/leaderboard/private/view/{aoc_leaderboard_id}\n\n   Name                   📋 \n──────────────────────────── \n 1 Person                 62 \n 2 Person                 61 \n 3 Person                 56 \n 4 Person                 45 \n 5 Person                 37 \n 6 Person                 32 \n 7 Person                 29 \n 8 Person                 23 \n 9 Person                 20 \n10 Person                 18 \n11 Person                 17 \n```\n### Daily\n\n```md\nLeaderboard 2024: Day {day} solve times as of 10:55:29\n\nTime     Name             🏆 \n──────────────────────────── \n06:07:49 Person            1 \n06:08:57 Person            2 \n06:11:54 Person            1 \n06:12:15 Person            3 \n06:15:35 Person            2 \n06:24:11 Person            4 \n06:24:57 Person            5 \n06:29:07 Person            3 \n06:32:13 Person            4 \n06:47:20 Person            5 \n07:15:28 Person            6 \n07:31:38 Person            6 \n07:50:18 Person            7 \n07:58:19 Person            8 \n08:02:51 Person            9 \n08:08:56 Person            7 \n08:20:13 Person            8 \n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabjugard%2Faocslacker-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabjugard%2Faocslacker-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabjugard%2Faocslacker-python/lists"}