]> piware.de Git - bin.git/commitdiff
consors-report.py: updates master
authorMartin Pitt <martin@piware.de>
Thu, 2 May 2024 05:58:57 +0000 (07:58 +0200)
committerMartin Pitt <martin@piware.de>
Thu, 2 May 2024 05:58:57 +0000 (07:58 +0200)
build-cockpit-toolbox
consors-report.py

index 222d4b501a1630420fce19aa0e5ade5c6dc65977..39844bdd3f4757740e0983892a9c2c2b6615991b 100755 (executable)
@@ -4,8 +4,8 @@ NAME=${NAME:-cockpit}
 TAG=${TAG:-latest}
 
 toolbox rm --force $NAME || true
-podman pull quay.io/cockpit/tasks:${TAG}
-yes | toolbox create --image quay.io/cockpit/tasks:${TAG} -c $NAME
+podman pull ghcr.io/cockpit-project/tasks:${TAG}
+yes | toolbox create --image ghcr.io/cockpit-project/tasks:${TAG} -c $NAME
 
 # install some extra development and desktop tools
 toolbox run -c "$NAME" sh -exc '
@@ -17,12 +17,11 @@ sudo hostname -F /etc/hostname
 sudo sed -i s/nodocs// /etc/dnf/dnf.conf
 
 sudo dnf install -y ansible bash-completion man-db man-pages moreutils fd-find ripgrep gh git-delta neovim \
-    python3-boto python3-boto3 python3-openstacksdk python3-pytest-asyncio libnotify \
-    python3-mypy \
+    python3-boto python3-boto3 python3-openstacksdk libnotify \
     simple-scan /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert pdfmerge \
     cargo rustfmt clippy \
     calibre qt5-qtwayland \
-    dbus-daemon tmt tmt-provision-virtual flatpak-builder flatpak-spawn \
+    tmt flatpak-builder flatpak-spawn \
     fedpkg centpkg
 
 # commands to forward to the host
index f76deb3ea6211cc68e5b117548f8ea5e028fb1a8..84e21b7ed68be2f1a9621d1b4f59128f86341c79 100755 (executable)
@@ -19,7 +19,7 @@ CATEGORIES = {
                           '(Dr.*Borchers)|(Debeka.*Überweisung)|(DKV.*Überweisung)|Beihilfe|Klinik', re.I),
     'Versicherung': re.compile('((debeka|DKV|Hallesche|Versicherung|Alte Leipziger|ConceptIF|'
                                'Baloise).*Lastschrift)|Hallesche.*Bonu', re.I),
-    'Transport': re.compile('DB Vertrieb|Deutsche Bahn|Nextbike|Carsharing', re.I),
+    'Transport': re.compile('DB Vertrieb|Deutsche Bahn|Nextbike|Carsharing|Radstation', re.I),
     'Lebensmittel': re.compile('BIOS|Bäcker|Baecker|Ruta|Rewe', re.I),
     'Eigentumswohnungen': re.compile('Rechnung Darl.-Leistung|Semmelweis', re.I),
     'Hobby/Sport': re.compile('Holstein|Mrs. Sporty|Kieser|DJK|Dimaso', re.I),
@@ -47,6 +47,8 @@ def get_category(item: str) -> str:
 
 def parse_entry(raw_fields: Iterable[str]) -> Entry:
     fields = [f.strip() for f in raw_fields]
+    # format change in May 2024, adds a 9th field "Währung"; ignore
+    fields = fields[:8]
     # last field is the value, parse as float
     value = float(fields.pop().replace('.', '').replace(',', '.'))
     # match on who, IBAN, type, or desc
@@ -64,7 +66,7 @@ def parse_csv(path: Path, date_filter: str) -> Iterable[Entry]:
         return filter_re.search(entry.date)
 
     with path.open() as f:
-        reader = csv.reader(f)
+        reader = csv.reader(f, delimiter=';')
         next(reader)  # skip header
         # first line is the column headers, chop it off
         entries = map(parse_entry, reader)