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

Install ovault and development dependencies with

pip install -e ".[dev]"

Build for Testing

maturin develop --release --features python

Test

./test.sh

Build Documentation

./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.4-cp37-abi3-manylinux_2_34_x86_64.whl (585.8 kB view details)

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

File details

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

File metadata

File hashes

Hashes for ovault-0.0.4-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 47214decd0e64f46665eeb2a4b40a742fb681b15bfff60694a73544d9678324a
MD5 1b67ad689c0b7ec00b9035397cb3e047
BLAKE2b-256 bbf043855308550b40be94df853387ba4a1fd5e5a557fcfeb2fe0a423f1ddf87

See more details on using hashes here.

Provenance

The following attestation bundles were made for ovault-0.0.4-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