add protocol parsing

This commit is contained in:
2021-03-04 21:49:52 +01:00
parent 7a8597189c
commit fb0d174dcb
5 changed files with 21 additions and 2 deletions

View File

@@ -138,6 +138,14 @@ if __name__ == "__main__":
config = yaml.full_load(open(args.config))
if config["redeleitung"]["name"].startswith("./"):
with open(config["redeleitung"]["name"]) as f:
config["redeleitung"]["name"] = f.read().strip()
if config["protokoll"]["name"].startswith("./"):
with open(config["protokoll"]["name"]) as f:
config["protokoll"]["name"] = f.read().strip()
if args.invite:
template_file = config["invite_template_file"]
elif args.presentation:

View File

@@ -1,9 +1,9 @@
redeleitung:
name: Yannik Enss
name: ./data/redeleitung
email: yannik.enss@fsmi.uni-karlsruhe.de
protokoll:
name: Tobias Wiese
name: ./data/protokoll
pre_tops:
- title: Begrüßung

6
get_last_proto.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/bash -e
read -s -p "DB-Passwort: " password;
echo
echo $password | ssh fsmi "psql -A -t -h fsmi-db fsmi -c \"select protokoll from protokolle where ist_veroeffentlicht='f' order by datum desc limit 1\"" 2> /dev/null > data/last_proto

3
get_redeleitung_proto.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
grep -oP '(?<=nächste Redeleitung: ).*(?=</li>)' data/last_proto > data/redeleitung
grep -oP '(?<=nächstes Protokoll: ).*(?=</li>)' data/last_proto > data/protokoll

View File

@@ -2,6 +2,8 @@
./read_uvproto.sh
./read_ubmails.py
./generate.py --presentation > data/presentation_$(date +%Y-%m-%d).tex
./get_last_proto.sh
./get_redeleitung_proto.sh
cd data/presentation/
pdflatex ../presentation_$(date +%Y-%m-%d).tex