How can I export my Tomboy notes into Evernote?

The basic process seems to be export your Tomboy notes to html: Tools > Export

Then use email to send the files into your Evernote account. Instructions for using email to import notes are here in this Evernote support article.

The notes themselves are stored as individual XML files in ~/.local/share/tomboy, so it's possible to convert them to whatever form you need through your own scripts if the Export doesn't provide exactly you what you need.


Use Tomboy2Evernote exporter: https://github.com/rPawel/Tomboy2Evernote

Exports notes with links, colours & formatting straight to *.enex format file.

python Tomboy2Evernote.py -i ~/.local/share/tomboy -o ~/Desktop

Once you have the exported notes, import them into Evernote:

File > Import > Evernote Export Files


If you do not mind all of your notes on one page (items searchable by hyperlink) you can try this.

  1. Copy the following code into a text editor, save as script.py and run it in the folder where the Tomboy notes are kept. (Typically .local/share/tomboy/ in Linux). At the command line, run python script.py:

    #!/usr/bin/env python
    #
    #   This script creates a tomboy note containing link to each other note
    #   so one can easily export all the notes to an HTML file
    #
    #   author:Pedro
    #
    #   Check out lamehacks.net for more lame scripts and stuff
    
    import dbus, time
    
    note_title = "Note Index"
    
    # Get the D-Bus session bus
    bus = dbus.SessionBus()
    
    # Access the Tomboy D-Bus object
    obj = bus.get_object("org.gnome.Tomboy","/org/gnome/Tomboy/RemoteControl")
    
    # Access the Tomboy remote control interface
    tomboy = dbus.Interface(obj, "org.gnome.Tomboy.RemoteControl")
    
    notes_links = ""
    
    for note in tomboy.ListAllNotes():
    notes_links += tomboy.GetNoteTitle(note) + " \n"
    
    uri = tomboy.FindNote(note_title)
    if uri == "":
    uri = tomboy.CreateNamedNote(note_title)
    
    tomboy.SetNoteContents(uri, note_title + "\n\n" + notes_links)
    tomboy.DisplayNote(uri)
    

    This will create an empty Tomboy note.

  2. Then run this code at the command line, in the same folder where your Tomboy notes are stored:

    for i in *.note; do
    xpath -q -e '/note/title' $i;
    done \ sed -r 's%^<title>(.*)</title>%\1%g'
    

This will generate a list of titles. Copy and Paste those into the blank Tomboy note created by the python script. Then export this note as a single HTML file. Send this file as an email attachment to your Evernote account.


Code taken from Lamehacks Blog