akosbalasko / yarle

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

Summary log does not report failed conversions properly #369

Open carpii opened 2 years ago

carpii commented 2 years ago

I'm converting a bunch of notebooks, one at a time.

The summary log gives the impression that everything went well..

Conversion finished: 47 succeeded, 0 skipped, 0 failed. Total notes: 47

But I notice around 4 notes are missing. Checking the conversion log in more detail, I see there were indeed some failures - it's not clear what causes this yet (EDIT: Fixed this. It seems yarle expects you to pre-create the "_resources" sub directory, even though it creates the parent notebook directory for you).

The log does report the error, but then counts the note as successfully converted anyway...

Conversion started at Wed Apr 06 2022 21:23:12 GMT+0100 (British Summer Time)
Converting note "_deploy.domain setup"...
relative resource work dir: ./_resources
absolute resource work dir: /Users/carpii/Desktop/MD/notes/Server Setup/_resources
Failed to convert note: _deploy.domain setup, {"errno":-2,"syscall":"scandir","code":"ENOENT","path":"/Users/carpii/Desktop/MD/notes/Server Setup/_resources"}
Conversion finished at Wed Apr 06 2022 21:23:12 GMT+0100 (British Summer Time)
Note "_deploy.domain setup" converted successfully in 0.003 seconds.
Notes processed: 6

Config:

Current config is: {
    "enexSources": [
        "/Users/carpii/Desktop/Evernote/Server Setup.enex"
    ],
    "outputDir": "/Users/carpii/Desktop/MD",
    "keepOriginalHtml": false,
    "isMetadataNeeded": true,
    "isNotebookNameNeeded": false,
    "isZettelkastenNeeded": false,
    "plainTextNotesOnly": false,
    "skipWebClips": false,
    "useHashTags": true,
    "nestedTags": {
        "separatorInEN": "_",
        "replaceSeparatorWith": "/",
        "replaceSpaceWith": "-"
    },
    "outputFormat": "ObsidianMD",
    "urlEncodeFileNamesAndLinks": true,
    "sanitizeResourceNameSpaces": true,
    "replacementChar": "_",
    "pathSeparator": "/",
    "resourcesDir": "_resources",
    "turndownOptions": {
        "headingStyle": "atx"
    },
    "skipLocation": true,
    "skipCreationTime": false,
    "skipUpdateTime": false,
    "skipSourceUrl": false,
    "skipTags": false,
    "skipEnexFileNameFromOutputPath": false,
    "keepMDCharactersOfENNotes": true,
    "monospaceIsCodeBlock": true,
    "currentTemplate": "---\n\n{created-at-block}_Created at {created-at}._{end-created-at-block}\n{updated-at-block}_Last updated at {updated-at}._{end-updated-at-block}\n{source-url-block}_Source URL: []({source-url})._{end-source-url-block}\n\n\n{tags-block}\nTagged: \n```\n{tags}\n```\n{end-tags-block}\n\n---\n\n{title-block}# {title}{end-title-block}\n\n\n{content-block}{content}{end-content-block}\n\n",
    "logseqSettings": {
        "journalNotes": false
    },
    "obsidianSettings": {
        "omitLinkDisplayName": false
    },
    "dateFormat": "YYYY-MM-DD",
    "keepOriginalAmountOfNewlines": true,
    "addExtensionToInternalLinks": false,
    "generateNakedUrls": true,
    "haveEnexLevelResources": true,
    "haveGlobalResources": false
}
github-actions[bot] commented 2 years ago

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

bgszsk commented 4 months ago

+1 for the spirit of this.

Since note conversion failures are reported amid the successful conversions, it's not easy to identify which notes in a notebook were not converted.

In the conversion log, seeing both Failed to convert note... then Conversion finished... is a bit confusing. Seeing "finished" can be read as meaning the conversion succeeded when, if I understand correctly, it only means the attempt at conversion completed - and still ended in failure.

Accurately counting the failures at the end of notebook conversion log could make it easier for users to understand the success of the overall notebook conversion. Failures should be correctly counted. Total note count should reflect total notes including failures. This would improve my ability as a user to troubleshoot my notebook conversions.