only read fsr protocols, ignore others. also cleanup
This commit is contained in:
14
read_db.sh
Executable file
14
read_db.sh
Executable file
@@ -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: ).*(?=</li>)' data/last_proto > data/redeleitung
|
||||
grep -oP '(?<=nächstes Protokoll: ).*(?=</li>)' data/last_proto > data/protokoll
|
||||
Reference in New Issue
Block a user