Clean up
This commit is contained in:
@@ -189,7 +189,6 @@ def load_config():
|
|||||||
dump = json.dumps(json_data)
|
dump = json.dumps(json_data)
|
||||||
|
|
||||||
loaded = json.loads(dump)
|
loaded = json.loads(dump)
|
||||||
# config = Models.Config(**json.loads((json_data)))
|
|
||||||
config = Models.Config(**loaded)
|
config = Models.Config(**loaded)
|
||||||
|
|
||||||
return config
|
return config
|
||||||
@@ -197,19 +196,6 @@ def load_config():
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
"""
|
|
||||||
if len(sys.argv) < 3:
|
|
||||||
print("Provide arguments\n")
|
|
||||||
print("main.py 'username' 'password'")
|
|
||||||
|
|
||||||
sys.exit(-1)
|
|
||||||
|
|
||||||
logger.info("simplenote_export running")
|
|
||||||
|
|
||||||
cred = Models.SimplenoteCredentials(sys.argv[1], sys.argv[2])
|
|
||||||
print("Username: %s" % (cred.username))
|
|
||||||
"""
|
|
||||||
|
|
||||||
if len(sys.argv) != 2:
|
if len(sys.argv) != 2:
|
||||||
print("Provide argument")
|
print("Provide argument")
|
||||||
print("Main.py \"config.json\"")
|
print("Main.py \"config.json\"")
|
||||||
@@ -217,9 +203,7 @@ def main():
|
|||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
|
|
||||||
print("Hello")
|
print("s20")
|
||||||
|
|
||||||
# notes = get_simplenote_list(cred)
|
|
||||||
|
|
||||||
config = load_config()
|
config = load_config()
|
||||||
|
|
||||||
@@ -270,15 +254,12 @@ def main():
|
|||||||
# elif dev == 1:
|
# elif dev == 1:
|
||||||
elif config.mode == "token":
|
elif config.mode == "token":
|
||||||
token.access_token = config.token
|
token.access_token = config.token
|
||||||
|
|
||||||
# onenote_mgr = OneNoteManager.OneNoteManager(config=config)
|
|
||||||
else:
|
else:
|
||||||
token = onenote_mgr.fetch_token()
|
token = onenote_mgr.fetch_token()
|
||||||
|
|
||||||
config.token = token.access_token
|
config.token = token.access_token
|
||||||
|
|
||||||
onenote_mgr = OneNoteManager.OneNoteManager(config=config)
|
onenote_mgr = OneNoteManager.OneNoteManager(config=config)
|
||||||
# onenote_mgr.load_token(token)
|
|
||||||
|
|
||||||
export_to_onenote(notes, onenote_mgr, chosen_notebook="Simplenote", chosen_section="From Simplenote")
|
export_to_onenote(notes, onenote_mgr, chosen_notebook="Simplenote", chosen_section="From Simplenote")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user