feat: automate weekly chores management

- Initialized .gitignore to exclude virtual environment
- Added a comprehensive chores checklist as a markdown file
- Introduced development dependencies (ruff, black) in requirements-dev.txt
- Updated chores script to read tasks from the markdown file instead of an environment variable, improving task organization and maintainability
This commit is contained in:
Kumi 2024-07-28 20:41:30 +02:00
parent 965d1a41f1
commit e575fd9e08
Signed by: kumi
GPG key ID: ECBCC9082395383F
4 changed files with 101 additions and 6 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
venv/

94
assets/chores.md Normal file
View file

@ -0,0 +1,94 @@
Heya! It's about time for your weekly chores again!
- [ ] Check for server updates
- [ ] Frink
- [ ] Marge
- [ ] Chalmers
- [ ] Selma
- [ ] Homer
- [ ] Lard Lad
- [ ] Pencil
- [ ] Chimpman
- [ ] Hannah
- [ ] Nelson
- [ ] Punch
- [ ] Grimey
- [ ] Edna
- [ ] Lance
- [ ] Ducky
- [ ] Barney
- [ ] Check for new versions of projects
- [ ] Invidious (Chimpman)
- [ ] Nitter (Chimpman)
- [ ] Uptime Kuma (Marge)
- [ ] redlib (Chimpman)
- [ ] Synapse (Selma)
- [ ] Element (Frink)
- [ ] Minio (Homer)
- [ ] Gothub (Frink)
- [ ] Mautrix-Telegram (Lard Lad)
- [ ] Mautrix-WhatsApp (Lard Lad)
- [ ] Mautrix-Slack (Lard Lad)
- [ ] Mautrix-Discord (Lard Lad)
- [ ] Mautrix-Signal (Lard Lad)
- [ ] Mautrix-Meta (Facebook, Lard Lad)
- [ ] GPTbot (Lard Lad)
- [ ] CryptPad (Pencil)
- [ ] Structables (Frink)
- [ ] Matrix.to (Frink)
- [ ] AllTube (Frink)
- [ ] yt-dlp
- [ ] NocoDB (Hannah)
- [ ] Penpot (Hannah)
- [ ] Overleaf (Hannah)
- [ ] YOURLS (Pencil)
- [ ] Mastodon (skrt.social/cuddly.space) (Nelson)
- [ ] Forgejo (Edna)
- [ ] LibreY (Pencil)
- [ ] Rallly (Chimpman)
- [ ] Piped (Chimpman)
- [ ] Shields (Chimpman)
- [ ] Planka (Chimpman)
- [ ] Check if everything is working
- [ ] Invidious (Chimpman)
- [ ] Nitter (Chimpman)
- [ ] Uptime Kuma (Marge)
- [ ] check if any new services need to be added
- [ ] redlib (Chimpman)
- [ ] Synapse (Selma)
- [ ] Element (Frink)
- [ ] Minio (Homer)
- [ ] Gothub (Frink)
- [ ] Zammad (Marge)
- [ ] Postgres (Chalmers)
- [ ] Postgres (Grimey)
- [ ] MariaDB (Chalmers)
- [ ] Mautrix-Telegram (Lard Lad)
- [ ] Mautrix-WhatsApp (Lard Lad)
- [ ] Mautrix-Slack (Lard Lad)
- [ ] Mautrix-Discord (Lard Lad)
- [ ] Mautrix-Signal (Lard Lad)
- [ ] Mautrix-Meta (Facebook, Lard Lad)
- [ ] GPTbot (Lard Lad)
- [ ] CryptPad (Pencil)
- [ ] Structables (Frink)
- [ ] Matrix.to (Frink)
- [ ] AllTube (Frink)
- [ ] NocoDB (Hannah)
- [ ] Penpot (Hannah)
- [ ] Overleaf (Hannah)
- [ ] YOURLS (Pencil)
- [ ] Mastodon (skrt.social/cuddly.space) (Nelson)
- [ ] Forgejo (Edna)
- [ ] Virtualmin (Lance)
- [ ] Webmin (Ducky)
- [ ] LibreY (Pencil)
- [ ] Rallly (Chimpman)
- [ ] Piped (Chimpman)
- [ ] Shields (Chimpman)
- [ ] Planka (Chimpman)
- [ ] Update chore list template (if required)
Have a nice day!
Your CoffeeBot

2
requirements-dev.txt Normal file
View file

@ -0,0 +1,2 @@
ruff
black

View file

@ -1,6 +1,5 @@
import pathlib
import json
import argparse
import os
import urllib.request
import logging
@ -20,13 +19,12 @@ ASSIGNEES = os.environ.get("CHORES_ASSIGNEES").split()
REPO_OWNER = os.environ.get("CHORES_REPO_OWNER") or "PrivateCoffee"
REPO_NAME = os.environ.get("CHORES_REPO_NAME") or "chores"
EXPIRY_DAYS = int(os.environ.get("CHORES_EXPIRY_DAYS") or 2)
CHORES = (
os.environ.get("CHORES_TEXT")
or "Looks like you forgot to set the CHORES_TEXT environment variable."
)
CHORES = (pathlib.Path(__file__).parent.parent / "assets" / "chores.md").read_text()
due_date = (datetime.utcnow() + timedelta(days=EXPIRY_DAYS)).isoformat().split(".")[0] + "Z"
due_date = (datetime.utcnow() + timedelta(days=EXPIRY_DAYS)).isoformat().split(".")[
0
] + "Z"
payload = {
"title": "Weekly Chores",