Closed mezzode closed 6 months ago
Hi @mezzode , Could you pls send me your configuration? Thanks a lot!
@akosbalasko This is the config, without paths
{
"isMetadataNeeded": true,
"isNotebookNameNeeded": false,
"isZettelkastenNeeded": false,
"useZettelIdAsFilename": false,
"plainTextNotesOnly": false,
"skipLocation": true,
"skipCreationTime": true,
"skipUpdateTime": true,
"skipSourceUrl": true,
"skipWebClips": false,
"skipTags": true,
"useHashTags": true,
"outputFormat": "ObsidianMD",
"taskOutputFormat": "ObsidianMD",
"skipEnexFileNameFromOutputPath": false,
"keepMDCharactersOfENNotes": false,
"monospaceIsCodeBlock": false,
"keepOriginalHtml": true,
"resourcesDir": "_resources",
"trimStartingTabs": false,
"convertPlainHtmlNewlines": false,
"encryptionPasswords": [
""
],
"nestedTags": {},
"logseqSettings": {
"journalNotes": false
},
"obsidianSettings": {
"omitLinkDisplayName": false
},
"dateFormat": "YYYY-MM-DD HH:mm",
"keepImageSize": "ObsidianMD",
"keepOriginalAmountOfNewlines": true,
"addExtensionToInternalLinks": false,
"generateNakedUrls": true,
"urlEncodeFileNamesAndLinks": false,
"haveEnexLevelResources": false,
"haveGlobalResources": false,
"useUniqueUnknownFileNames": true,
"useLevenshteinForLinks": false,
"sanitizeResourceNameSpaces": false,
"replacementChar": "_",
"replacementCharacterMap": {
"<": "_",
">": "_",
":": "_",
"\"": "_",
"/": "_",
"\\": "_",
"|": "_",
"?": "_",
"*": "_"
}
}
And this is the template I've been using:
---
{created-at-block}date created: {created-at}{end-created-at-block}
{updated-at-block}date modified: {updated-at}{end-updated-at-block}
{source-url-block}evernote source url: {source-url}{end-source-url-block}
{notebook-block}evernote notebook: {notebook}{end-notebook-block}
{evernotelink-block}evernote link: {evernotelink}{end-evernotelink-block}
{evernoteguid-block}evernote guid: {evernoteguid}{end-evernoteguid-block}
{tags-block}
tags: {tags-array}
{end-tags-block}
---
{title-block}# {title}{end-title-block}
{link-to-original-block}{link-to-original}{end-link-to-original-block}
{content-block}{content}{end-content-block}
Hi @mezzode , Thanks for the info. A short question that may lead to a workaround: could you pls create Table of Content note and include it into the exported enex file? (Just select all notes, copy links, then create a new note named "Table of Contents" and paste the links there) Thanks!
I already created a Table of Contents note and the fields do get correctly populated for named notes, but for notes which are untitled the fields are just the placeholders
Hi @mezzode , Okay, thanks for the info, now I can reproduce the problem. The main issue is that in ToC if you add multiple Untitled notes, all of them are shown as Untitled, you have no clue which is which. What do you think, what would be the better solution:
Hmm between those two options, 2 is probably better since that way we don't lose any information.
I do wonder whether there's a way to use the auto-generated titles though, in Evernote untitled notes do display part of the first line as a title, and these are also used for the internal links in the ToC. It would be good if Yarle could add the matching title when converting untitled notes, that way the GUIDs can be directly matched. Updating the titles would actually also help with #478
Yesterday temporarily I implemented opt 1, because it was far more straightforward than opt2. The problem is that Evernote fails to keep valid information in Enex. Namely, if a note has no title, in the UI it is shown as "Untitled", and in the TOC it is shown as "Untitled" as a link, but in the Enex file it has a title called "Untitled Note". As the indirect linking is based on the text that is used in links (like what is in the ToC), it fails to identify the note itself. The same stands for GUID, as the guid is not stored within the note, just in the ToC, there is no way to use it to connect them. Opt2 is doable but it requires much effort, and I'm not sure that it is worth doing.
So the current solution works only if the notebook contains uniqually titled notes.
The only way, that came to my mind is to forget Enex as it is and use Evernote API to get the notebooks/notes and everything, but it requires much much effort to do, and now I'd focus on the target side like enabling direct import to Notion or Mem.
Actually in the current version of Evernote they all seem to be shown in the UI with a generated title based on the first line of text in the note, and this generated title is also used for the links in the ToC. So it should be possible to match untitled notes to their GUID by generating a title from their first lines then using that to match them to their link in the ToC?
@mezzode oh, really? I should be a brand new thing, or at least newer than my client, let me update my Evernote and check it. Yes, it would definitely solve the problems, thanks for raising my attention to this change!
oookay, I updated the client, and the first line of the note is added as title only if I click into the title field. If I do not set title field into focus, it remains untitled. And as it has title from now, it won't be recognized as untitled, so it would be converted as a normal title, if we assume that the title is unique.
So I think it doesn't solve the issue, I'd close this one as the opt1 is implemented and released, and then I'd open a different issue to put references for all of the notes that have the same name.
Hmm that's strange, it looks like they might have updated the behavior since for my older Untitled notes while they do show the generated title in Evernote and the ToC, when I export them in the exported .enex their title is left as "Untitled Note" meaning they aren't getting properly matched to the ToC. Whereas for brand new notes the behavior is as you describe. I can provide screenshots and the corresponding .enex files if that would help show you this
I think the solution would be to update the titles in the case where they're being left as "Untitled Note" to make sure we can properly match them like for newer notes since their titles aren't being updated on Evernote's side
When untitled notes are converted, the
{evernotelink}
block is just output as<YARLE_EVERNOTE_LINK_PLACEHOLDER>
and the{evernoteguid}
block is output as<YARLE_EVERNOTE_GUID_PLACEHOLDER>