keep-to-markdown
keep-to-markdown copied to clipboard
Error if title contains path separator
Under windows, If note title contains / it will result in an error. BTW I suppose also : and + are forbidden character for Windows filenames
Example of offending file
{
"color": "DEFAULT",
"isTrashed": false,
"isPinned": false,
"isArchived": false,
"textContent": "toto pipo",
"title": "1: 12/3/24 ",
"userEditedTimestampUsec": 1548706696486000,
"createdTimestampUsec": 1548706676397000
}
Error
Traceback (most recent call last):
File "/c/MyData/temp/keep to md/keep-to-markdown.py", line 194, in <module>
read_write_notes(args)
File "/c/MyData/temp/keep to md/keep-to-markdown.py", line 143, in read_write_notes
with open(f'{notespath}{filename}.md', 'w', encoding='utf-8') as mdfile:
FileNotFoundError: [Errno 2] No such file or directory: 'notes/1: 12/3/24 .md'
Othewise thanks for this nice ans simple tool thtat just saved me many hours ❤️