diff --git a/.gitignore b/.gitignore index c31558d..612bd71 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,6 @@ VRT/metadata VRT/vrt bin/data2json bin/dates2json -bin/ISOWeek bin/flush bin/items2count bin/score diff --git a/AT5/txt2corpus.sh b/AT5/txt2corpus.sh index f292930..dbc13c9 100755 --- a/AT5/txt2corpus.sh +++ b/AT5/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/GG/txt2corpus.sh b/GG/txt2corpus.sh index ade5aca..cfae1d9 100755 --- a/GG/txt2corpus.sh +++ b/GG/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/LitNL/txt2corpus.sh b/LitNL/txt2corpus.sh index 3df94b5..2e190c5 100755 --- a/LitNL/txt2corpus.sh +++ b/LitNL/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/Makefile b/Makefile index f9a3e67..eae919d 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ all: make bin/data2json make bin/dates2json make bin/flush - make bin/ISOWeek make bin/items2count make bin/score make bin/top20 @@ -31,9 +30,6 @@ bin/dates2json: cmd/dates2json/*.go bin/flush: cmd/flush/*.go go build -o $@ $^ -bin/ISOWeek: cmd/ISOWeek/*.go - go build -o $@ $^ - bin/items2count: cmd/items2count/*.go go build -o $@ $^ diff --git a/NOS/txt2corpus.sh b/NOS/txt2corpus.sh index 14a4c58..0b96fa3 100755 --- a/NOS/txt2corpus.sh +++ b/NOS/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/NU/txt2corpus.sh b/NU/txt2corpus.sh index fe43bc5..e141d35 100755 --- a/NU/txt2corpus.sh +++ b/NU/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/Oog/txt2corpus.sh b/Oog/txt2corpus.sh index b94cf9a..bf8ecc0 100755 --- a/Oog/txt2corpus.sh +++ b/Oog/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/RO/txt2corpus.sh b/RO/txt2corpus.sh index f9e88e1..a895345 100755 --- a/RO/txt2corpus.sh +++ b/RO/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/RTVNoord/txt2corpus.sh b/RTVNoord/txt2corpus.sh index 61cd640..b84fa09 100755 --- a/RTVNoord/txt2corpus.sh +++ b/RTVNoord/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/Sargasso/txt2corpus.sh b/Sargasso/txt2corpus.sh index ebd97fd..9ef8e8c 100755 --- a/Sargasso/txt2corpus.sh +++ b/Sargasso/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/Sikkom/txt2corpus.sh b/Sikkom/txt2corpus.sh index 6cce37c..dc5223c 100755 --- a/Sikkom/txt2corpus.sh +++ b/Sikkom/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/Tzum/txt2corpus.sh b/Tzum/txt2corpus.sh index f62eb7a..9cb7a60 100755 --- a/Tzum/txt2corpus.sh +++ b/Tzum/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/VRT/txt2corpus.sh b/VRT/txt2corpus.sh index 837b182..fc6c9c9 100755 --- a/VRT/txt2corpus.sh +++ b/VRT/txt2corpus.sh @@ -9,7 +9,7 @@ export TZ=Europe/Amsterdam if [ "$1" = "" ] then - ds=`ISOWeek -7` + ds=`date -d -7days +%G-%V` else case "$1" in 2[0-9][0-9][0-9]-[0-5][0-9]) diff --git a/cmd/ISOWeek/ISOWeek.go b/cmd/ISOWeek/ISOWeek.go deleted file mode 100644 index 9bbec96..0000000 --- a/cmd/ISOWeek/ISOWeek.go +++ /dev/null @@ -1,48 +0,0 @@ -package main - -/* - -Waarom? - -We willen year-week, bijvoorbeeld 2025-52 - -Als de datum 1 januari 2027 is, dan geeft dit: - - date +%Y-%V - -... dit: - - 2027-53 - -Dat is fout. Het moet zijn: - - 2026-53 - -Dit programma geeft wel de juiste uitvoer. - -*/ - -import ( - e "codeberg.org/pebbe/errors" - - "fmt" - "os" - "strconv" - "time" -) - -var ( - x = e.ExitErr -) - -func main() { - // arg 1: aantal dagen opgeteld bij huidige datum - d, err := strconv.Atoi(os.Args[1]) - x(err) - - location, err := time.LoadLocation("Europe/Amsterdam") - x(err) - - year, week := time.Now().AddDate(0, 0, d).In(location).ISOWeek() - fmt.Printf("%d-%02d\n", year, week) -} diff --git a/cmd/dates2json/dates2json.go b/cmd/dates2json/dates2json.go index f0fd390..6e4b7b5 100644 --- a/cmd/dates2json/dates2json.go +++ b/cmd/dates2json/dates2json.go @@ -26,7 +26,7 @@ var ( func main() { - files, err := os.ReadDir("/net/corpora/nlnieuws/data") + files, err := os.ReadDir("/net/corpora/nlnieuws/data/json") x(err) for _, file := range files { diff --git a/collect.sh b/collect.sh index cf2e230..da2b7ad 100755 --- a/collect.sh +++ b/collect.sh @@ -155,6 +155,6 @@ do done done -data2json $ds 1 > DATA-$ds-1.json -data2json $ds 4 > DATA-$ds-4.json +data2json $ds 1 > json/DATA-$ds-1.json +data2json $ds 4 > json/DATA-$ds-4.json diff --git a/www/app.html b/www/app.html index 1af3b1f..e0fa413 100644 --- a/www/app.html +++ b/www/app.html @@ -13,7 +13,6 @@
terugkijkend over vier weken