You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code I used to download all skatteverkets personnummer:
#!/bin/bash
# Based on the API here: https://skatteverket.entryscape.net/rowstore/dataset/b4de7df7-63c0-4e7e-bb59-1f156a591763/html
RESULTFILE=personnummer-skatteverket.txt
LIMIT=500
rm "$RESULTFILE" || echo "File doesn't exist"
for ((i=0; ; i+=LIMIT)); do
echo "Working with offset $i"
contents=$(curl -s -H 'Content-Type: application/json' "https://skatteverket.entryscape.net/rowstore/dataset/b4de7df7-63c0-4e7e-bb59-1f156a591763?_offset=$i&_limit=$LIMIT")
if jq -e '.results | length == 0' >/dev/null; then
break
fi <<< "$contents"
echo "$contents" | jq --raw-output '.results[] | .testpersonnummer' >> "$RESULTFILE"
done
echo "Entries collected: $(wc -l $RESULTFILE)"
With the help of these two components and the valid script here I could easily check all our code for personnummer that is is valid and if they match skatteverkets list.
Suggestion would be to add these features to this repository and I can create PR if there is interest.
Breaking changes
Nope
The text was updated successfully, but these errors were encountered:
Description
I had help with this script here and what I did to scan our code base for personnummer was a regex that looks like this:
The code I used to download all skatteverkets personnummer:
With the help of these two components and the valid script here I could easily check all our code for personnummer that is is valid and if they match skatteverkets list.
Suggestion would be to add these features to this repository and I can create PR if there is interest.
Breaking changes
Nope
The text was updated successfully, but these errors were encountered: