Last active
January 2, 2021 17:12
-
-
Save rlamacraft/584895cb2d7fff60395fa83d9b66e468 to your computer and use it in GitHub Desktop.
Migrating GoodReads CSV export to Recfile
This file contains 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
awk -v FPAT='[^,]*|"[^"]+"' 'BEGIN{ | |
print "# -*- mode: rec -*-"; | |
print ""; | |
print "%rec: To Read"; | |
print ""; | |
} | |
/to-read/ { | |
gsub("\"","",$2); | |
print "Name: " $2; | |
print "Author: " $3; | |
print "Date: " $16; | |
gsub("\"","",$17); | |
print "Tags: " substr($17,10); | |
print ""; | |
}' $FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment