wormi4ok/evernote2md

Spaces in titles converted to empty titles

Karut opened this issue · 5 comments

Karut commented

Problem statement

Basically the title. Some notes with spaces in their titles are being named unnamed note. I could not find a pattern yet which differentiates between notes that get this treatment and those who dont. Will update the pots with an example.

Example file

Hi @Karut ! There is no logic in the conversion that would use "unnamed" as a fall back value for title. But it would be curious to see an example. It may be some unexpected side effect in the Evernote export format and if the .enex file contains the expected title somewhere - it should be possible to build a workaround.

Karut commented

Hi!

Here is example .enex file where both notes get to be "unnamed". Attached the converted notes as well. Thanks for the help!

Archiv.zip

(On other note, perhaps I will add another issue: all my notes get a markdown heading named after their title. I am pretty sure this is not intended behaviour?, see example from on of the notes in the enex file)

image

I've looked at the raw .enex export in the archive you've shared and I believe the conversion worked as expected. Both notes have Unbenannte Notiz as a value for the note title.

image

And regarding this:

(On other note, perhaps I will add another issue: all my notes get a markdown heading named after their title. I am pretty sure this is not intended behaviour?, see example from on of the notes in the enex file)

This is an intended behaviour. Filesystems have many limitations and often do not allow to specify the filename exactly like it is written in the note title. But we can preserve the original title by prepending it in the beginning of the file content.

Karut commented

I've looked at the raw .enex export in the archive you've shared and I believe the conversion worked as expected. Both notes have Unbenannte Notiz as a value for the note title.

I figured out that the titles are exported from Evernote as expected with the Evernote legacy version. So the fault is on Evernotes part.

(On other note, perhaps I will add another issue: all my notes get a markdown heading named after their title. I am pretty sure this is not intended behaviour?, see example from on of the notes in the enex file)

This is an intended behaviour. Filesystems have many limitations and often do not allow to specify the filename exactly like it is written in the note title. But we can preserve the original title by prepending it in the beginning of the file content.

Is there an option to turn this off? My files are correctly imported in Obsidian with their specified titles. This would save me the hassle of deleting the headings of thousands of my notes.

Edit: I know this is a thing in Obsidian not something related to the conversion

Yeah, since this is specific to the tool you use for managing markdown notes, I'd try to avoid additional flags for conversion. But the beauty of open source is that you can compile your own build with this line commented out.

Or, on a UNIX-based operating system, a combination of find and sed would do the trick for you.

Good luck, and thanks for bringing it up!