Completed script
This commit is contained in:
@@ -216,12 +216,18 @@ def export_to_onenote(simplenotes, onenote_mgr, chosen_notebook=None, chosen_sec
|
|||||||
else:
|
else:
|
||||||
time.sleep(interval)
|
time.sleep(interval)
|
||||||
|
|
||||||
|
config = load_config()
|
||||||
|
onenote_mgr.config = config
|
||||||
|
|
||||||
bundle_notes_added = 0
|
bundle_notes_added = 0
|
||||||
else:
|
else:
|
||||||
bundle_notes_added += 1
|
bundle_notes_added += 1
|
||||||
|
|
||||||
total_notes_added += 1
|
total_notes_added += 1
|
||||||
|
|
||||||
|
if total_notes_added > 0:
|
||||||
|
print("Deleted %d notes" % (total_notes_added))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-6
@@ -84,7 +84,7 @@ class OneNoteManager(object):
|
|||||||
|
|
||||||
return notes
|
return notes
|
||||||
|
|
||||||
# Implement this function
|
# add note to OneNote
|
||||||
def add_note(self, note, onenote_section):
|
def add_note(self, note, onenote_section):
|
||||||
section_id = onenote_section['id']
|
section_id = onenote_section['id']
|
||||||
|
|
||||||
@@ -106,8 +106,8 @@ class OneNoteManager(object):
|
|||||||
|
|
||||||
# Returns string representation of the note used for creating pages
|
# Returns string representation of the note used for creating pages
|
||||||
def note_to_data(self, note):
|
def note_to_data(self, note):
|
||||||
title_str = note.title
|
title_str = note.title.decode("utf-8", "ignore")
|
||||||
content_str = note.content
|
content_str = note.content.decode("utf-8", "ignore")
|
||||||
|
|
||||||
data =""
|
data =""
|
||||||
|
|
||||||
@@ -136,9 +136,6 @@ class OneNoteManager(object):
|
|||||||
|
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
useless_cat_call = subprocess.run(["clip.exe"], stdout=subprocess.PIPE, text=True, input=user_code)
|
useless_cat_call = subprocess.run(["clip.exe"], stdout=subprocess.PIPE, text=True, input=user_code)
|
||||||
elif os.name == "posix":
|
|
||||||
useless_cat_call = subprocess.run(["clip.exe"], stdout=subprocess.PIPE, text=True, input=user_code)
|
|
||||||
|
|
||||||
|
|
||||||
app_code = flow['message']
|
app_code = flow['message']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user