akosbalasko / yarle

Yarle - The ultimate converter of Evernote notes to Markdown
https://github.com/akosbalasko/yarle
MIT License
1.42k stars 81 forks source link

Task export to ObsidianMD results in XML output with ID #434

Closed beevelop closed 1 year ago

beevelop commented 1 year ago

I'm trying to export a few thousand notes to Obsidian and it's working well for most parts. Unfortunately, the tasks in Evernote do not get exported properly. I have the following setup:

Config file (config.json)

```json { "enexSources": [ "/Users/[...]/Absolute Inbox.enex" ], "templateFile": "/Users/[...]/sampleTemplate.tmpl", "outputDir": "/Users/[...]/result", "isZettelkastenNeeded": false, "useZettelIdAsFilename": false, "plainTextNotesOnly": false, "skipWebClips": false, "useHashTags": true, "outputFormat": "ObsidianMD", "taskOutputFormat": "ObsidianMD", "urlEncodeFileNamesAndLinks": false, "skipEnexFileNameFromOutputPath": false, "monospaceIsCodeBlock": false, "keepMDCharactersOfENNotes": false, "keepOriginalAmountOfNewlines": false, "addExtensionToInternalLinks": true, "nestedTags": { "separatorInEN": "_", "replaceSeparatorWith": "/", "replaceSpaceWith": "-" }, "resourcesDir": "_resources", "turndownOptions": { "headingStyle": "atx" }, "dateFormat": "YYYY-MM-DD", "haveEnexLevelResources": true, "haveGlobalResources": false, "useUniqueUnknownFileNames": false, "logseqSettings": { "journalNotes": false }, "obsidianSettings": { "omitLinkDisplayName": false }, "obsidianTaskTag": "gtd" } ```

I tried to configure "taskOutputFormat": "ObsidianMD", to enable the task export. But with a minimal reproducible example (Note with 4 tasks) it results in the following export in Obsidian:

<YARLE-EN-V10-TASK>3103aeba-8b27-[...]-9ac5-d8a1cbbd4ab9</YARLE-EN-V10-TASK>

Did I miss a setting / is there a misconfiguration?

github-actions[bot] commented 1 year ago

Yihaa, thank you for reporting me this issue and to let me improve Yarle!

akosbalasko commented 1 year ago

Hi @beevelop !

That's strange, there <YARLE-EN-V10-TASK>3103aeba-8b27-[...]-9ac5-d8a1cbbd4ab9</YARLE-EN-V10-TASK> lines in the content are temporary placeholders of the tasks, these should be replaced by the real tasks converted to md (this is because of the new implementation tasks in Evernote).

Could you please send me an example that fails in order to reproduce the problem? here is my email address: akos0215@gmail.com

Thanks a lot!

beevelop commented 1 year ago

@akosbalasko That's what I thought too. I sent you an invite for the example via mail.

akosbalasko commented 1 year ago

@beevelop Thank you I have it. I check it and get back to you with the problem (or the fix :) ) asap.

akosbalasko commented 1 year ago

@beevelop didn't you miss exporting the Tasks into the Enex file in Evernote?

Screenshot 2023-01-04 at 23 52 21

If I select tasks to be exported, Yarle converts the tasks well (the dates are invalid for some reason, but at least the tasks are there), those temporary placeholders are left only if the tasks are not exported at all into the Enex file.

t3mujin commented 1 year ago

Just adding my two cents here: I was having the same issue when running over an entire notebook ENEX file, regardless of the taskOutputFormat setting, but when running it over an ENEX file of a single note it worked perfectly. My workaround, and because I had few of them, was to export the notes with tasks separately.

beevelop commented 1 year ago

@akosbalasko I checked the full enex file in VScode and can verify that the tasks are contained in the export. That's the format contained in the final result:

  <note>
    <title>title of the note</title>
    <created>20220728T101921Z</created>
    <updated>20220728T101944Z</updated>
    <note-attributes>
      <author>Maik</author>
      <latitude>[...]</latitude>
      <longitude>[...]</longitude>
      <altitude>[...]</altitude>
      <source>mobile.android</source>
    </note-attributes>
    <content>
      <![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div style="--en-task-group:true; --en-id:[...];--en-content-hash:[...];-webkit-user-modify:read-only;-moz-user-modify:read-only;user-modify:read-only;border-radius:3px;border:1px solid rgba(182,182,182,0.09);background:rgba(174,174,174,0.09);overflow:hidden;color:#868686"><div style="background:rgba(182,182,182,0.09) no-repeat 6px 6px url(&quot;data:image/svg+xml;base64,P[...]==&quot;);padding:8px 38px;font-weight:600">Content not supported</div><div style="padding:2px 6px;margin: 1em">This block is a placeholder for Tasks, which has been officially released on the newest version of Evernote and is no longer supported on this version. Deleting or moving this block may cause unexpected behavior in newer versions of Evernote.</div></div><div><br /></div></en-note>      ]]>
    </content>
    <task>
      <title>Lasertag [...]</title>
      <created>[...]</created>
      <updated>[...]</updated>
      <taskStatus>open</taskStatus>
      <taskFlag>false</taskFlag>
      <sortWeight>W</sortWeight>
      <noteLevelID>923d4756-[...]</noteLevelID>
      <taskGroupNoteLevelID>3103aeba-[...]</taskGroupNoteLevelID>
      <dueDate>[...]</dueDate>
      <statusUpdated>[...]</statusUpdated>
      <creator>297[...]</creator>
      <lastEditor>297[...]</lastEditor>
    </task>
    <task>
      <title>[...]</title>
      <created>[...]</created>
      <updated>[...]</updated>
      <taskStatus>open</taskStatus>
      <taskFlag>false</taskFlag>
      <sortWeight>U</sortWeight>
      <noteLevelID>49dde967-[...]</noteLevelID>
      <taskGroupNoteLevelID>3103aeba-[...]</taskGroupNoteLevelID>
      <dueDate>[...]</dueDate>
      <statusUpdated>[...]</statusUpdated>
      <creator>297[...]</creator>
      <lastEditor>297[...]</lastEditor>
    </task>
    <task>
      <title>[...]</title>
      <created>[...]</created>
      <updated>[...]</updated>
      <taskStatus>open</taskStatus>
      <taskFlag>false</taskFlag>
      <sortWeight>Q</sortWeight>
      <noteLevelID>e991deac-[...]</noteLevelID>
      <taskGroupNoteLevelID>3103aeba-[...]</taskGroupNoteLevelID>
      <dueDate>[...]</dueDate>
      <statusUpdated>[...]</statusUpdated>
      <creator>297[...]</creator>
      <lastEditor>297[...]</lastEditor>
    </task>
    <task>
      <title>[...]</title>
      <created>[...]</created>
      <updated>[...]</updated>
      <taskStatus>open</taskStatus>
      <taskFlag>false</taskFlag>
      <sortWeight>I</sortWeight>
      <noteLevelID>652fb3ec-[...]</noteLevelID>
      <taskGroupNoteLevelID>3103aeba-[...]</taskGroupNoteLevelID>
      <dueDate>[...]</dueDate>
      <statusUpdated>[...]</statusUpdated>
      <creator>297[...]</creator>
      <lastEditor>297[...]</lastEditor>
    </task>
  </note>
akosbalasko commented 1 year ago

@t3mujin Thank you for your insights, that was the hint that let me reproduce the problem. @beevelop it is fixed in the latest release (4.15.2), please check it out.

Thank you all!