Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to export my Tomboy notes to the Evernote web service, I have seen this web site but I don't want to send my Tomboy notes to an untrusted site where they may be put to unknown use.

Is there any other way?

share|improve this question

4 Answers 4

up vote 3 down vote accepted

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.

share|improve this answer
    
Thanks for your answer, I think its the most reasonable solution that doesn't require writing an app. The export to html was buggy and I had to pipe through html2text then to mail as well as various other small problems. –  Jeff Jan 22 '13 at 5:27
    
There is a plugin that allows you to export directly to txt. I found it to be better than html2text when handling all those special characters. robpvn.net/plaintext-export –  wujj123456 Jun 16 '13 at 6:57

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

share|improve this answer

I wrote a Python script that simply parses .note files from the Tomboy dir and convertes them to .enex files, which can then be imported into Evernote via a desktop app:

https://gist.github.com/scribu/7442170

share|improve this answer

In the nixnote/nevernote package (a linux client for evernote), there is a contributed package called TomboyExporter (see TomboyExporter.tar.gz at http://sourceforge.net/projects/nevernote/files/Current/).

I found it to be poorly documented, but once I figured out how to run it, it worked very well, with the exception of two issues: (1) hyperlinks are converted to plaintext (but underlined), (2) most underlined text (except when surrounded in italics, for example) is just lost, due to a bug. Otherwise, it does a good job at keeping formatting when possible, and it will also organize your notes into notebooks, keeping the same organizational structure you had in Tomboy (also preserves last-modified dates, etc.). It doesn't keep links to other notes, but that's asking a lot.

To use it, extract the .tar.gz package, then go to the src/ directory. Run like: java Exporter [desired output directory] ~/.local/share/tomboy/*note It creates several .nnex file, one per notebook (so each file contains many notes). Then just import these from evernote.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.