The Tagspaces website suggests a complex manual process for exporting evernote notes into its format. But evernote XML is easy enough to scrape for basic metadata that Programmer's Laziness takes over. Follow the steps below to produce a folder of files named according to the Tagspaces convention (tags are in the filename between brackets).
I wrote this and used it once with apparent success on my own (Mac) system, but did no careful testing. This function can move a large number of files, so back up before using it.
The export preserves tags and note titles as well as a good deal of attached
data (via the .resources
directories evernote exports, which are linked in
the exported HTML). Spaces are removed from tag names. Creation/modification
metadata and notebook structure are lost. The former is easy to extract from
the evernote XML but impossible to export because Tagspaces relies on file
system metadata. I wasn't making use of the multiple-notebook feature.
-
Export notes as HTML files to a directory, say
notes
. -
Export notes as an evernote XML file, say
notes.enex
. -
Notes with
:
in their title lead to files with/
in their names. Seriously. There is no easy way to get at these files programmatically. Manually replace the/
with-
(hyphen). -
In R:
source("enex.R") enex_tagspace("notes.enex", "notes", dry=T)
This will not rename files but will tell you what will happen and alert you to any notes whose corresponding files cannot be found. If there are any of these, return to step 3.
-
To actually make the change:
enex_tagspace("notes.enex", "notes", dry=F)
For some reason I get this error. Hope you can advise.
"Error in doc_parse_file(con, encoding = encoding, as_html = as_html, options = options) :
internal error: Huge input lookup [1]"