Skip to content

Instantly share code, notes, and snippets.

@AndiH
Last active April 19, 2021 06:41
Show Gist options
  • Save AndiH/8d2233c6a3e4bb546bdeebe0dff005cb to your computer and use it in GitHub Desktop.
Save AndiH/8d2233c6a3e4bb546bdeebe0dff005cb to your computer and use it in GitHub Desktop.
Impf Extraction
Kreis Erstimpfung Folgeimpfung Erstimpfung Folgeimpfung Erstimpfung Folgeimpfung Summe
Aachen 93.368 34.456 13.845 39 107.213 34.495 141.708
#!/usr/bin/env bash
URL="https://coronaimpfung.nrw/fileadmin/ci_dateien/pdf/Durchgef%C3%BChrte_Impfungen_je_Kreis.pdf"
DATE=$(date +"%Y-%m-%d")
curl -o "${DATE}.pdf" ${URL}
echo "Written ${DATE}.pdf"
#!/usr/bin/env bash
INPUT="$1"
OUTPUT="${INPUT%.*}.csv"
pdftotext -layout ${INPUT} - | grep -e 'Erstimpfung\|Aachen' | tr -s " " "," | sed 's/,Erstimpfung/Kreis,Erstimpfung/' > ${OUTPUT}
@AndiH
Copy link
Author

AndiH commented Apr 19, 2021

Ah, sehr gut. Für diese Datums-Regex war ich zu faul 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment