Skip to main content

Library for Managing your Obsidian Vault

Project description

OVault

A python library for accessing and editing your Obsidian vault.

Check out the examples!

Install

pip install ovault

Example

import ovault

v = ovault.Vault("path/to/vault")

print()
print("path        :", v.path)
print("notes       :", len(v.notes()))
print("attachments :", len(v.attachments()))
print("tags        :", v.tags())

Features

Vault Management

Indexing
  • Indexing: Automatically indexes all notes and attachments within the vault upon initialization.
  • Ignored Files: Respects and parses .vault-ignore files to exclude specified paths during indexing.
  • Dangling Links: Identify and list links within your notes that point to non-existent files.

Note Handling

Access & Properties
  • Access Notes & Attachments: Retrieve all notes or attachments in the vault as Python objects.
  • Note Properties: Access key information for each note, including its full path, relative path, name, character length, associated tags, internal links, and backlinks.
  • Content Access: Read the raw content of any note.
  • Frontmatter Extraction: Easily retrieve YAML frontmatter from notes.
Modification
  • Dynamic Note Modification: Programmatically insert text into notes at specific character positions, or intelligently before/after recognized markdown tokens.

Tag Management

Querying Tags
  • List All Tags: Get a complete list of all unique tags present across your entire vault.
  • Filter by Tag: Efficiently retrieve all notes associated with a specific tag.

Markdown Parsing & Tokenization

Token Representation
  • Rich Token Representation: Notes are parsed into a detailed stream of Token objects, representing various markdown elements.
  • Available Tokens:
    • Headers: (# Heading)
    • Tags: (#tag)
    • Code Blocks: (fenced code, inline code)
    • Quotes: (> Quote)
    • Math: ($inline$ and $$display$$ LaTeX)
    • Dividers: (---)
    • Callouts: (> [!type] Title)
    • Plain Text:
    • Frontmatter: (YAML metadata)
    • Internal Links: ([[Note Name]], ![[Image.png]])
    • External Links: ([link text](url), ![image alt](url))
    • TemplaterCommand: (<% code goes here %>)

Development

Build for Testing

maturin develop --release --features python

Test

./test.sh

Build Documentation

pip install pdoc3
./docs/build.py

Release

  1. Bump version in Cargo.toml
  2. Commit change and push
  3. Create a git tag with the same version: git tag <version>
  4. Push new tag: git push --tags

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovault-0.0.3-cp37-abi3-manylinux_2_34_x86_64.whl (441.9 kB view details)

Uploaded CPython 3.7+manylinux: glibc 2.34+ x86-64

File details

Details for the file ovault-0.0.3-cp37-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ovault-0.0.3-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6882c375458564e42f2b148dcc65611aa9efee4e292411bb8088b4bd6a243610
MD5 60b1ff1190f837c87e25a78d08776502
BLAKE2b-256 591098c2a613d58d358df3f2e73eca80ac6d5cfd24552f407dc691a8ab480ed1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovault-0.0.3-cp37-abi3-manylinux_2_34_x86_64.whl:

Publisher: release.yaml on BalderHolst/ovault

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page