Display title of note on error
cverbiest opened this issue · comments
Context
I'm converting a file containing 384 notes.
Would it be possible to display the title of the note being converted ? That would help to isolate the issue. I cannot share the entire file as it may contain sensitive info, but if I know which note cannot be converted I can create an export file for that one.
C:\Temp>evernote2md.exe Evernote.enex evout
Notes: 5 / 384 [=>___________________________________________________________________________________________________________________________________] 1.30% 1s2020/09/15 09:59:50 save resource evout/image/ldif.jpg?version=1&modificationdate=1224043351324&api=v2: open evout\image\ldif.jpg?version=1&modificationdate=1224043351324&api=v2: The filename, directory name, or volume label syntax is incorrect.
Solution
C:\Temp>evernote2md.exe Evernote.enex evout
Notes: 5 / 384
Error during conversion of "XXXXX"
[=>___________________________________________________________________________________________________________________________________] 1.30% 1s2020/09/15 09:59:50 save resource evout/image/ldif.jpg?version=1&modificationdate=1224043351324&api=v2: open evout\image\ldif.jpg?version=1&modificationdate=1224043351324&api=v2: The filename, directory name, or volume label syntax is incorrect.
Hey!
This is something that should be fixed. I plan to add a debug mode flag in the next few days. It's going to be a -v
flag that turns on verbose output for situations like this.
Here is the new version with the flag that I mentioned: v0.11.0. Let me know if it helps to clarify which note causes an issue.
In debug mode the output is going to look like this:
C:\Temp>evernote2md.exe -v Evernote.enex evout
2020/09/16 22:08:24 [DEBUG] Saving file ./evout/note1.md
2020/09/16 22:08:24 [DEBUG] Saving attachment ./evout/image/1.png
2020/09/16 22:08:24 [DEBUG] Saving attachment ./evout/image/2.png
2020/09/16 22:08:24 [DEBUG] Saving file ./evout/note2.md
2020/09/16 22:08:24 [DEBUG] Saving attachment ./evout/image/3.png
So the last note you see in the output is most likely the culprit.
Great, it helps
2020/09/17 10:56:02 [DEBUG] Saving file evout/Getting_an_LDIF_Export_of_a_User_or_Group-Crowd_2-8-Atlassian_Documentation.md
2020/09/17 10:56:02 [DEBUG] Saving attachment evout/image/grey_attach.png
2020/09/17 10:56:02 [DEBUG] Saving attachment evout/image/ldif.jpg?version=1&modificationdate=1224043351324&api=v2
2020/09/17 10:56:02 [ERROR] save resource evout/image/ldif.jpg?version=1&modificationdate=1224043351324&api=v2: open evout\image\ldif.jpg?version=1&modificationdate=1224043351324&api=v2: The filename, directory name, or volume label syntax is incorrect.
I'll create separate Issue for the error
Closing this one in favor of #13