This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"Songs":[{"title":"Bach - Suite n° 2 en ré mineur, BWV 1008, Sarabande","id":"35S2fYXnoIs"},{"title":"Bach - Cantate BWV 82, V. Aria: “Ich freue mich auf meinem Tod”","id":"wQlsJS127_0"},{"title":"Monteverdi - L’Orfeo, Acte III, “Possente Spirto”","id":"uAH8N8fPCZE"},{"title":"Jacchini - Sonate en mi bémol majeur, Op. 1, n° 7","id":"8KOPN-0jn2A"},{"title":"Scarlatti - Sonate pour clavier en si mineur, K. 197","id":"s388LWQf848"},{"title":"Bach - Prélude et fugue en sol dièse mineur, BWV 887","id":"QSbRFUZkA3o"},{"title":"Hildur Guðnadóttir - Baer ","id":"uSMGpK5M2fE"},{"title":"Biber - Sonate n° 6 pour violon et basse continue en do mineur, C. 95","id":"1Vr-qxq-KnA"},{"title":"Dvorak - Danse slave Op. 46 n° 7 en do mineur ","id":"Vqlnupv0d-o"},{"title":"Purcell - Jubilate Deo en D majeur","id":"ek-43z_fTPY"},{"title":"Vivaldi - Concerto pour violon en D mineur, RV 208a","id":"RhHNzFa53-o"},{"title":"Schubert - Ständchen, “Leise flehen meine Lieder”","id":"Vn1jSZFaJyw"},{"title":"Telemann - Fantaisie n° 2","i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script searches for NBER working papers (PDFs starting with "w2") and renames them in "Authors - Title (NBER Year)"" format. | |
# Arguments : | |
# $1 = folder to be searched. If left empty, look into Downloads | |
if [ -z $1 ]; then folder="~/Downloads"; else folder="$1"; fi | |
function getMoveCommand { | |
while read data; do | |
curl "http://www.nber.org/papers/${data}.ris" | awk -v folder="${folder}" -v quote="'" -F" - " '{if ($1=="AU") {sub(/,.*/,"",$2); authors=authors", "$2} else if ($1=="TI"){title=$2} else if ($1=="PY") {year=$2} else if ($1=="L1") {gsub(/.*\//,"",$2); file=$2}} END {sub(/^, /,"",authors); print "mv "folder"/"file" "quote""folder"/"authors" - "title" ("year").pdf"quote}' | |
done | |
} |