Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

__pycache__/N2Omodule.cpython-38.pyc
__pycache__
N2O-TS1.py
venv
16 changes: 13 additions & 3 deletions N2O.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def debug_print(msg):


num_link = [0, 0, 0, 0]
error_filepath = []
# Process all MD files
for n in mdIndex:

Expand All @@ -128,9 +129,13 @@ def debug_print(msg):
else:
append_write = 'w' # make a new file if not

# Save modified content as new .md file
with open(newfilepath, append_write, encoding='utf-8') as tempFile:
[print(line.rstrip(), file=tempFile) for line in mdContent]
try:
# Save modified content as new .md file
with open(newfilepath, append_write, encoding='utf-8') as tempFile:
[print(line.rstrip(), file=tempFile) for line in mdContent]
except FileNotFoundError:
print(f"::OnSave:: Possible long file path for windows? {newfilepath}\n")
error_filepath.append(newfilepath)



Expand All @@ -156,13 +161,18 @@ def debug_print(msg):
print(' !!File Exception!!',ObsidianPaths[n])
print(NotionPathRaw[n], file=e)
print('', file=e)






print(f"\nTotal converted links:")
print(f" - Internal links: {num_link[0]}")
print(f" - Embedded links: {num_link[1]}")
print(f" - Blank links : {num_link[2]}")
print(f" - Number tags : {num_link[3]}")
print(f" - FileException : {len(error_filepath)}")


# Save temporary file collection to new zip
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
easygui==0.98.3