Skip to content

Commit

Permalink
remove sitelinks
Browse files Browse the repository at this point in the history
  • Loading branch information
athalhammer committed Oct 24, 2024
1 parent 8e96ea6 commit 1d60ac6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions rpi/raspberry-danker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ INDEX_FILE="index.html"
PROJECT_LINKS=".allwiki.links"

# Compute PageRank and upload
filename=$(./danker.sh -k ALL)
filename=$(./danker.sh ALL)
bzip2 "$filename.rank"
VER=${filename//$PROJECT_LINKS/}
aws s3 cp s3://"$S3_BUCKET/$INDEX_FILE" .
Expand All @@ -42,11 +42,13 @@ aws s3 cp "$filename.stats.txt" s3://"$S3_BUCKET"/ --grants read=uri=http://acs.
rm "$filename"

# Prepare sitelinks and upload
filename="${filename%.*}".sitelinks.count
sort -k1,1 ./*.site.links | cut -f 1 | uniq -c | awk '{print $2 "\t" $1}' > "$filename"
bzip2 "$filename"
aws s3 cp "$filename".bz2 s3://"$S3_BUCKET"/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
# 2024-10-24: NOT NEEDED - use <http://wikiba.se/ontology#sitelinks> on Wikidata live endpoint instead.
#
#filename="${filename%.*}".sitelinks.count
#sort -k1,1 ./*.site.links | cut -f 1 | uniq -c | awk '{print $2 "\t" $1}' > "$filename"
#bzip2 "$filename"
#aws s3 cp "$filename".bz2 s3://"$S3_BUCKET"/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers

# Cleanup
rm ./*.site.links
#rm ./*.site.links
rm "$TMPDIR" -rf

0 comments on commit 1d60ac6

Please sign in to comment.