improved readability

This commit is contained in:
venus
2026-03-04 23:32:08 -06:00
parent c41f3a0286
commit 48d27184be
3 changed files with 12 additions and 11 deletions

View File

@@ -26,7 +26,9 @@ def obsidian_vault(dest = "/vault"): # makes sure there is a vault in dest
print ("token not found, cant build vault")
raise NameError("tokenNotFound")
return 0
url = f"https://{token}@{url}"
url = f"https://{token}@{url}"
if os.path.exists(os.path.join(dest, '.git')):
#TODO handle merge conflictsjjj
print (f"pulling vault from {url} in {dest}")
@@ -52,7 +54,8 @@ def public_notes(src: str): # return a list of notes tagged with public from an
# return a list of notes
return vault.get_notes_with_tag("public")
def public_vault(dest: str): # build the public vault in dest from an obsidian repo in src
def public_vault(dest: str, src: str = "/content"): # build the public vault in dest from an obsidian repo in src
for note in public_notes(src):
print(note.title)
shutil.copy2(f"{note.path}", dest)