Closed MrLagavulin closed 7 months ago
As requested, here is the export of a test notebook with the problematic note (renamed as zip). 20240409_202124_7594_Lagavulin.zip
Since it was the only one causing these problems, I transferred it manually. The images are probably loaded from the www when they are accessed, so they are not really integrated into the note. I've also transferred the tables manually in the meantime; there weren't too many of them.
Thanks anyway for the support
The issue is fixed. You note is converted correctly with by the new version, with all the images.
When I try with the new Version, I get: PS C:\Users\Lagavulin\Documents\Einstellungen\NAS\Notes\Test> python nsx2md.py File "C:\Users\Lagavulin\Documents\Einstellungen\NAS\Notes\Test\nsx2md.py", line 106
^
SyntaxError: invalid character '·' (U+00B7)
Could you recheck. Line 106 of the script is if attachment_list:
, it can't raise SyntaxError.
Where does Note-Station-to-markdown/nsx2md.py at master · Maboroshy/Note-Station-to-markdown
comes from? It's that ·
symbol that causes the issue. When I download the code from GitHub I get Note-Station-to-markdown-master.zip
. How have you got this path?
Could you send me .nsx file with the note.
I've manually inserted Note-Station-to-markdown/nsx2md.py at master · Maboroshy/Note-Station-to-markdown
as notebook and note title in the test note you've sent before and it was all good in Windows.
I've also just tweaked path handling a little more. Maybe it will change something for the new issue.
In the latest version it's line 108:
This dot (U+00B7) is the Problem. 20240409_202124_7594_Lagavulin.zip
It looks like you've downloaded the script by saving it's GitHub web page instead of the script file itself. Could you download the script by <> Code
button at the top -> Download ZIP
.
Oh, sorry, I always downloaded the script directly, never via the ZIP download. I'm still a little untrained in these things. In fact, it now works without any error message. Thank you very much.
Converting plain text notes works quite well on Windows 11, but I'm currently having two problems:
1 Message:
Unconverted table found. Tweaking pandoc options may (or may not) allow to convert it.
How to tweek pandoc? This error does not stop the conversion.
2 Message:
Traceback (most recent call last): File "C:\Users\Lagavulin\Documents\Einstellungen\NAS\Notes\nsx2md.py", line 236, in
link_path = urllib.request.pathname2url(link_path).replace('///', '')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^.
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.752.0_x64__qbz5n2kfra8p0\Lib\nturl2path.py", line 73, in pathname2url
raise OSError(error)
OSError: Bad path: media/2456https://static.tp-link.com/image023_1493261584939q.png
This error is particularly annoying because it aborts the conversion. It would be helpful if, when an error occurs, the conversion would skip the erroneous note and continue with the next one. Then, if necessary, I would copy the incorrect notes by hand.
Thanks again for having a look in this.