From 22da5c79e5e1edf75b0899268d7528a71d0b5139 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 26 Apr 2024 08:10:34 +0200 Subject: [PATCH 1/3] build-cockpit-toolbox: Drop obsolete packages tmt-provision-virtual got merged into tmt, the others are already in the tasks container. --- build-cockpit-toolbox | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build-cockpit-toolbox b/build-cockpit-toolbox index 16a81c3..39844bd 100755 --- a/build-cockpit-toolbox +++ b/build-cockpit-toolbox @@ -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 -- 2.39.2 From 8e8cb09025a73f6a41c347037f70e3e9df5707e7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 2 May 2024 07:54:03 +0200 Subject: [PATCH 2/3] consors-report: Adjust to format change in May 2024 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Consors changed back to semicolon separator (see commit 6da88a57b007c9), and added a 9th field "Währung". Convert the older CSVs with ```py import csv import sys with open(sys.argv[1], 'r') as csvfile: reader = csv.reader(csvfile, delimiter=',', quotechar='"') writer = csv.writer(sys.stdout, delimiter=';', quotechar='"') for row in reader: writer.writerow(row) ``` --- consors-report.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/consors-report.py b/consors-report.py index f76deb3..272b06b 100755 --- a/consors-report.py +++ b/consors-report.py @@ -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) -- 2.39.2 From c76e8a3dc4a7dde61ee287c1c468ad22bdb5580f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 2 May 2024 07:58:57 +0200 Subject: [PATCH 3/3] consors-report.py: updates --- consors-report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consors-report.py b/consors-report.py index 272b06b..84e21b7 100755 --- a/consors-report.py +++ b/consors-report.py @@ -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), -- 2.39.2