diff --git a/generator.conf b/generator.conf deleted file mode 100644 index d97f512..0000000 --- a/generator.conf +++ /dev/null @@ -1,69 +0,0 @@ -redeleitung: - name: ./data/redeleitung - email: yannik.enss@fsmi.uni-karlsruhe.de - -protokoll: - name: ./data/protokoll - -pre_tops: - - title: Begrüßung - protostub: Der FSR wird begrüßt - - title: Feststellung der Beschlussfähigkeit - protostub: Der FSR ist beschlussfähig - - title: Tagesordnung - body: '\tableofcontents' - protostub: '{% for top in to %}# {{top.title}} - -{% endfor %}' - - title: Unveröffentlichte Protokolle - file: "data/uvproto.txt" - body: "* FSR-Protokoll vom {{last_date|date}}" - - title: Berichte - protostub: - -post_tops: - - title: Unbeantwortete E-Mails - protostub: ' - {{top.body}} - Die E-Mails wurden verteilt' - file: "data/ubemails.txt" - - title: Nächster FSR - body: 'Wann: {{next_date.strftime("%d.%m.%Y")}} {{time.strftime("%H:%M")}} \linebreak - Wo: {{place}} \linebreak - Redeleitung: ? \linebreak - Protokoll: ?' - protostub: '* Termin: {{next_date.strftime("%d.%m.%Y")}} - -* Ort: {{place}} - -* nächste Redeleitung: XXXXXXXX - -* nächstes Protokoll: XXXXXXXX' - - title: Termine - file: "data/termine.txt" - protostub: '{| -{{"{{"}}Termin|was=AAAAAAAAAA|wann=XX.YY.{{"}}"}} -{{top.body}} -|}' - - title: Sonstiges - -invite_template_file: templates/fsr_einladung.j2 -mminvite_template_file: templates/fsr_einladung_mm.j2 -presentation_template_file: templates/fsr_presentation.tex.j2 -protocol_template_file: templates/fsr_protokoll.j2 - -top_mbox_file: data/fsr_tops.mbox - -mbox_out: data/invitemail.mbox - -default_weekday: 2 #Mittwoch -default_time: "17:30" -meeting_link: https://meet.vs.kit.edu/b/len-prm-rv4 -place: Big Blue Button - -invite_mail: fsr-einladung@fsmi.uni-karlsruhe.de -invite_subject: 'Einladung zum Fachschaftsrat am {{date|weekday}}, dem {{date|date}}' - -mm_url: https://mattermost.fsmi.uni-karlsruhe.de/hooks/xpqbpuxug3fsin5zwpcbuu11ky - -# vim: filetype=yaml diff --git a/generator.conf.example b/generator.conf.example index 797e414..2f6d23d 100644 --- a/generator.conf.example +++ b/generator.conf.example @@ -1,9 +1,9 @@ redeleitung: - name: Rede Leitung + name: ./data/redeleitung email: rede.leitung@fsmi.uni-karlsruhe.de protokoll: - name: Protokoll Ant + name: ./data/protokoll pre_tops: - title: Begrüßung @@ -15,14 +15,18 @@ pre_tops: protostub: '{% for top in to %}# {{top.title}} {% endfor %}' - - title: Unbeantwortete E-Mails - protostub: 'Die E-Mails wurden verteilt' - title: Unveröffentlichte Protokolle + file: "data/uvproto.txt" body: "* FSR-Protokoll vom {{last_date|date}}" - title: Berichte protostub: post_tops: + - title: Unbeantwortete E-Mails + protostub: ' + {{top.body}} + Die E-Mails wurden verteilt' + file: "data/ubemails.txt" - title: Nächster FSR body: 'Wann: {{next_date.strftime("%d.%m.%Y")}} {{time.strftime("%H:%M")}} \linebreak Wo: {{place}} \linebreak @@ -36,25 +40,30 @@ post_tops: * nächstes Protokoll: XXXXXXXX' - title: Termine + file: "data/termine.txt" protostub: '{| {{"{{"}}Termin|was=AAAAAAAAAA|wann=XX.YY.{{"}}"}} +{{top.body}} |}' - title: Sonstiges invite_template_file: templates/fsr_einladung.j2 +mminvite_template_file: templates/fsr_einladung_mm.j2 presentation_template_file: templates/fsr_presentation.tex.j2 protocol_template_file: templates/fsr_protokoll.j2 -top_mbox_file: fsr_tops.mbox +top_mbox_file: data/fsr_tops.mbox + +mbox_out: data/invitemail.mbox default_weekday: 2 #Mittwoch default_time: "17:30" meeting_link: https://meet.vs.kit.edu/b/abc-def-ghi -place: BigBlueButton +place: Big Blue Button -invite_mail: alle@fsmi.uni-karlsruhe.de +invite_mail: fsr-einladung@fsmi.uni-karlsruhe.de invite_subject: 'Einladung zum Fachschaftsrat am {{date|weekday}}, dem {{date|date}}' -mbox_out: invitemail.mbox +mm_url: https://mattermost.fsmi.uni-karlsruhe.de/hooks/whatever # vim: filetype=yaml diff --git a/get_last_proto.sh b/get_last_proto.sh deleted file mode 100755 index bd53fb9..0000000 --- a/get_last_proto.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 - diff --git a/get_redeleitung_proto.sh b/get_redeleitung_proto.sh deleted file mode 100755 index 0238756..0000000 --- a/get_redeleitung_proto.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -grep -oP '(?<=nächste Redeleitung: ).*(?=)' data/last_proto > data/redeleitung -grep -oP '(?<=nächstes Protokoll: ).*(?=)' data/last_proto > data/protokoll diff --git a/prepare_presentation.sh b/prepare_presentation.sh index 2a710b4..3aac670 100755 --- a/prepare_presentation.sh +++ b/prepare_presentation.sh @@ -1,9 +1,7 @@ #!/bin/bash -./read_uvproto.sh +./read_db.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 diff --git a/prepare_protocol.sh b/prepare_protocol.sh new file mode 100755 index 0000000..35ca39b --- /dev/null +++ b/prepare_protocol.sh @@ -0,0 +1,5 @@ +#!/bin/bash +./read_db.sh +./read_ubmails.py +./generate.py --proto > ~/fsmi/protokolle/$(date +%Y-%m-%d) + diff --git a/read_db.sh b/read_db.sh new file mode 100755 index 0000000..5a20c67 --- /dev/null +++ b/read_db.sh @@ -0,0 +1,14 @@ +#!/bin/bash -e +read -s -p "DB-Passwort: " password; +echo + +raw_proto=$(echo $password | ssh fsmi "psql -A -t -h fsmi-db fsmi -c \"select datum from protokolle where ist_veroeffentlicht='f' and name is null\"" 2> /dev/null) +echo $password | ssh fsmi "psql -A -t -h fsmi-db fsmi -c \"select protokoll from protokolle where ist_veroeffentlicht='f' and name is null order by datum desc limit 1\"" 2> /dev/null > data/last_proto + +for proto in $raw_proto; +do + echo "* FSR-Protokoll vom $proto" +done > data/uvproto.txt + +grep -oP '(?<=nächste Redeleitung: ).*(?=)' data/last_proto > data/redeleitung +grep -oP '(?<=nächstes Protokoll: ).*(?=)' data/last_proto > data/protokoll diff --git a/read_uvproto.sh b/read_uvproto.sh deleted file mode 100755 index fca53bb..0000000 --- a/read_uvproto.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -e -read -s -p "DB-Passwort: " password; -echo - -raw_proto=$(echo $password | ssh fsmi "psql -A -t -h fsmi-db fsmi -c \"select datum from protokolle where ist_veroeffentlicht='f'\"" 2> /dev/null) - -for proto in $raw_proto; -do - echo "* FSR-Protokoll vom $proto" -done | tee data/uvproto.txt -echo File has been written