Skip to content

Commit

Permalink
use title instead of path
Browse files Browse the repository at this point in the history
  • Loading branch information
YouXam committed Jul 2, 2023
1 parent ff0717b commit 8c1a642
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async def job():
finally:
shutil.rmtree(f'{block_id}_tmp')
print(f"[+] {path} is successfully updated.")
change['updated'].append(path)
change['updated'].append(front_matter.get('title') or path)


async def update_list(path):
Expand All @@ -174,6 +174,7 @@ async def job():
for page in now_list - all_pages:
shutil.rmtree(os.path.join(os.path.join(os.path.dirname(path), "notion"), page))
logging.info(f"[*] Removed {page}")
# TODO: use title instead of path
change['deleted'].append(page)

print("====== notion-sync ======")
Expand Down

0 comments on commit 8c1a642

Please sign in to comment.