Jump to content

how can I import my diigo bookmarks into evernote?


Recommended Posts

Hello,

can anybody tell me - how can I import my diigo bookmarks (with tags) into evernote?

I want to import everything from diigo into evernote and quit with diigo - don't want any IFTTT games.

I have googled this question - nothing clear. but I don't believe there is no normal, simple solution.

by the way - I'm on Mac OS X 10.6, if it matters.

 

 

thank You in advance

 

Link to comment
  • 2 months later...

Looking in the code on that page, I see where "root" is in there as a variable. Since I am not a developer, I have no idea what could be done to re-tool that script to make it work right. Maybe someone on here would know what to do?

Link to comment
  • 8 months later...
  • 1 year later...

I wrote and awk script:

  1. Export from Diigo as CSV tab-delimited 
  2. Clean up the file a bit, remove empty lines (mine had several)
  3. Replace all ampersands in the URL's with & for URL encoding - it was quicker to just do that then figure out awk's gsub() issues with ampersands.
  4. 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>"; }
'

Link to comment
On 20 May 2016 at 9:31 PM, cmt73 said:

I wrote and awk script:

  1. Export from Diigo as CSV tab-delimited 
  2. Clean up the file a bit, remove empty lines (mine had several)
  3. 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.
  4. 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>"; }
'

Cool! How can I run this?

Thanks :)

Link to comment
  • Level 5*
3 hours ago, GiacomoLaw said:

Cool! How can I run this?

I'm not familiar with Diggo, but took note of the "export as .csv file"

With a .csv file, you can import the data into Evernote using Applescript.
Its more direct than the awk script; instead of creating a .enex file, the Applescript can parse the data and directly create notes, applying tags, title, content etc as required.

I can advise you on the Applescript code for this.
I use this process to import bank transactions from a .csv file

Link to comment
  • 3 months later...

If this is still useful to anyone, I have about 6000 delicious bookmarks that I needed to bring into Evernote. The link to the jsfiddle above that grberk posted was super close, but it wasn't grabbing tags (which is mostly what I used delicious for). I made a very simple modification which gets the tags, Just replace the "createNote" function with this:

function createNote(context, folder_path) {
    number_parsed++;
    var a = $(context).children('a:first');
    var url = a.attr('href');
    var importedTags = a.attr('TAGS').toString();
    var ADD_DATE = ISODateString(new Date(1000 * parseInt(a.attr('ADD_DATE'), 10)));
    var title = a.text().encodeHTML();
    var tags = "";
        
    importedTags = importedTags.split(',');
        for (var i = 0; i < importedTags.length; i++) {
        tags += "<tag>" + importedTags.encodeHTML().trim() + "</tag>";
    }

    var note = "<note><title>" + title + "</title><content> <" + "![CDATA[  <en-note>" + title + "<br /><a href=\"" + url + "\">" + url + "</a></en-note>]" + "]></content><created>" + ADD_DATE + "</created>" + tags + "<note-attributes><source-url>" + url.encodeHTML() + "</source-url></note-attributes></note>\n\n\n";

    result += note;
}

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...