public notes work now
This commit is contained in:
14
app/build.py
14
app/build.py
@@ -44,18 +44,18 @@ def obsidian_vault(dest = "/vault"): # makes sure there is a vault in dest
|
||||
print("cloned vault!")
|
||||
return 1
|
||||
|
||||
def public_notes(privateVault = "/vault"): # return a list of notes tagged with public from an obsidian directory in privateVault
|
||||
# build vault object from source
|
||||
def public_vault(privateVault = "/vault", dest = "/content"): # build the public vault in dest from an obsidian repo in src
|
||||
vault = Vault(privateVault)
|
||||
if not(vault):
|
||||
print("could not find vault")
|
||||
raise NameError("vaultNotFound")
|
||||
return []
|
||||
# return a list of notes
|
||||
return vault.get_notes_with_tag("public")
|
||||
return 0
|
||||
|
||||
print(f"valid vault{vault}")
|
||||
|
||||
publicNotes = vault.get_notes_with_tag("public")
|
||||
|
||||
def public_vault(privateVault = "/vault", dest = "/content"): # build the public vault in dest from an obsidian repo in src
|
||||
for note in public_notes(privateVault):
|
||||
print(f"publicNotes: {publicNotes}")
|
||||
for note in publicNotes:
|
||||
print(note.title)
|
||||
shutil.copy2(f"{note.path}", dest)
|
||||
|
||||
Reference in New Issue
Block a user