Skip to content
Permalink
Browse files

changed the legislative period from a hard written date to two parame…

…ters
  • Loading branch information...
eest9 committed Mar 15, 2019
1 parent 2a9b1ab commit 2a93a4270c08574942e2e1a48a6b7ac2da08d133
Showing with 13 additions and 1 deletion.
  1. +1 −0 get_begut.sh
  2. +12 −1 get_regv.sh
@@ -10,6 +10,7 @@ sed -i 's/#text/text/' ./data/begut/Begut_data-count.json #jq can't parse "#"
Begut_count="$(cat './data/begut/Begut_data-count.json' | jq '.OgdSearchResult.OgdDocumentResults.Hits.text')"
echo $Begut_count
Begut_count=${Begut_count:1:(-1)}
#Begut_count=${Begut_count//\"}
let Begut_count=($Begut_count/100)+1
echo $Begut_count

@@ -1,6 +1,17 @@
#!/bin/bash
#parmeters for the RIS API
Regv_par='?Applikation=Regv&BeschlussdatumVon=2013-10-29&BeschlussdatumBis=2017-11-08&DokumenteProSeite=OneHundred'
#Regv_par='?Applikation=Regv&BeschlussdatumVon=2013-10-29&BeschlussdatumBis=2017-11-08&DokumenteProSeite=OneHundred'

#check if parameters are valide ISO 8601 dates
if [[ ! $1 == [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] ]]; then
echo "parameter 1 must be a date"
exit 1
elif [[ ! $2 == [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] ]]; then
echo "parameter 2 must be a date"
exit 1
fi

Regv_par='?Applikation=Regv&BeschlussdatumVon='$1'&BeschlussdatumBis='$2'&DokumenteProSeite=OneHundred'

mkdir -p ./data/regv/

0 comments on commit 2a93a42

Please sign in to comment.
You can’t perform that action at this time.