Use OR REPLACE for holidays

This commit is contained in:
~lucidiot 2023-02-26 14:04:05 +01:00
parent 73508dd70f
commit ae4fe16ee4
1 changed files with 1 additions and 1 deletions

View File

@ -18,4 +18,4 @@ curl -s 'https://data.education.gouv.fr/api/explore/v2.1/catalog/datasets/fr-en-
"$_parse_ics" |
jq -r '[._components[] | select(._type == "VEVENT").description[][] | gsub("\\\\n"; "\n")]|join("\n\n")' |
recsel -e 'population != "Enseignants" && location = "Grenoble"' |
recfmt "INSERT INTO holidays (start, end, closed) SELECT SUBSTR('{{start_date}}', 0, 11), SUBSTR('{{end_date}}', 0, 11), FALSE; "
recfmt "INSERT OR REPLACE INTO holidays (start, end, closed) SELECT SUBSTR('{{start_date}}', 0, 11), SUBSTR('{{end_date}}', 0, 11), FALSE; "