obsidian-lib

Crates.ioobsidian-lib
lib.rsobsidian-lib
version0.2.1
created_at2024-12-31 04:19:51.869066+00
updated_at2025-01-01 05:46:27.224674+00
descriptionA library for reading and extracting files from Obsidian .obby plugin files
homepage
repositoryhttps://github.com/0xnim/obsidian-lib
max_upload_size
id1499734
size2,127,935
Niklas Wojtkowiak (0xnim)

documentation

https://docs.rs/obsidian-lib

README

obsidian-lib

Crates.io Documentation

A Rust library for reading and extracting files from Obsidian .obby plugin files.

Features

  • Read .obby file metadata
  • List all entries in an .obby file
  • Extract specific files from the archive
  • Handles both compressed and uncompressed entries
  • Convenience function for extracting plugin.json

Installation

Add this to your Cargo.toml:

[dependencies]
obsidian-lib = "0.1.0"

Usage

use obsidian_lib::{ObbyReader, extract_plugin_json};
use std::path::Path;

// Extract just plugin.json
let json = extract_plugin_json(Path::new("path/to/plugin.obby"))?;
println!("Plugin JSON: {}", json);

// Or work with the archive more generally
let mut reader = ObbyReader::open(Path::new("path/to/plugin.obby"))?;

// List all entries
println!("Available entries: {:?}", reader.list_entries());

// Extract specific entry
let data = reader.extract_entry("plugin.json")?;

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Commit count: 19

cargo fmt