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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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.
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
#!/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.
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.
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:
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.