Jump to content


Level 1
  • Posts

  • Joined

  • Last visited

Everything posted by cmt73

  1. On a Mac, you can drag your selected tags from the Tag view into a separate application's Text document where they'll be inserted as comma-separated, or drag them right into another note and they'll be applied.
  2. I wrote and awk script: Export from Diigo as CSV tab-delimited Clean up the file a bit, remove empty lines (mine had several) Replace all ampersands in the URL's with &amp; for URL encoding - it was quicker to just do that then figure out awk's gsub() issues with ampersands. Run the awk script on the file and basically that was it. My first couple tries I was getting errors because of the ampersands, but otherwise that's it. usage: ./parse-evernote.ksh diigo.csv > diigo-export-full.enex Here's the ksh script: ------------ #!/bin/ksh cat $1 | awk -F'\t' ' BEGIN { print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; print "<!DOCTYPE en-export SYSTEM \"http://xml.evernote.com/pub/evernote-export3.dtd\">"; print "<en-export export-date=\"20160520T205637Z\" application=\"Evernote\" version=\"Evernote Mac\">"; } { printf("\t<note>\n\t\t<title>%s</title>\n\t\t<content><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note style=\"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;\">%s<br/><a href=\"%s\">%s</a><br/>%s<br/>%s<br/>%s<br/></en-note>]]></content>\n\t\t<created>20160520T205637Z</created>",$1,$1,$2,$1,$4,$5,$6); tags=$3; split(tags,tagArray,","); if(NR>1) { for (i=0; i<length(tagArray); i++) { if (length(tagArray) > 0) printf("\n\t\t<tag>%s</tag>",tagArray); } } printf("\n\t\t<note-attributes><source-url>%s</source-url></note-attributes>\n\t</note>\n",$2); } END { print "</en-export>"; } '
  • Create New...