obsidian-parser
Blazingly fast Rust library for parsing and analyzing Obsidian vaults.
Features
- ⚡ High Performance: Parses 1000+ notes in under 3ms
- 🧠 Knowledge Graphs: Built-in integration with
petgraphfor advanced analysis - 🧩 Flexible API: Supports both in-memory and on-disk note representations
- 🔍 Frontmatter Parsing: Extract YAML properties with
serdecompatibility - 🌐 Link Analysis: Identify connections between notes
- 👾 WebAssembly Support: Add
obsidian-parserto your Obsidian plugins
Quick Start
Add to Cargo.toml:
[]
= "0.9"
Basic Usage
- Basic Parsing
use *;
use Deserialize;
// Parse single file with `HashMap`
let note_hashmap = from_file_default.unwrap;
println!;
println!;
// Parse single file with custom struct
let note_with_serde: = from_file.unwrap;
- Vault Analysis
use *;
// Load entire vault
let options = new;
let vault: VaultInMemory = new
.into_iter
.filter_map
.build_vault
.unwrap;
// Check for duplicate note names
if !vault.have_duplicates_notes_by_name
// Access parsed notes
for note in vault.notes
- Graph Analysis (requires
petgraphfeature)
Example: Analyze Knowledge Connectivity
Included example analyzer calculates connected components in your Obsidian vault's knowledge graph:
Performance
My PC AMD Ryzen 5 3600X with NVMe SSD
| Operation | Time |
|---|---|
| Vault initialization | 739.35 µs |
| Graph construction | 1.22 ms |
| Peak memory usage | 900 KiB |
License
MIT © CryptoGladi