| Crates.io | basalt-core |
| lib.rs | basalt-core |
| version | 0.6.1 |
| created_at | 2025-02-01 10:33:41.712768+00 |
| updated_at | 2025-06-07 13:39:38.525846+00 |
| description | Provides the core functionality for Basalt TUI application |
| homepage | |
| repository | https://github.com/erikjuhani/basalt |
| max_upload_size | |
| id | 1538342 |
| size | 58,901 |
This crate provides the core functionality for Basalt TUI application and interoperability layer to Obsidian vaults and notes.
Obsidian module provides functionality operating with Obsidian. It lets you read and manipulate Obsidian's configuration, vaults, and notes.
Currently supports reading vaults, notes, and writing to note path.
use basalt_core::obsidian::{ObsidianConfig, Error, Vault};
let config = ObsidianConfig::from([
("Obsidian", Vault::default()),
("My Vault", Vault::default()),
]);
_ = config.get_vault_by_name("Obsidian");
Markdown module provides a markdown parser that produces a custom AST using the
pulldown_cmark::Parser. The "AST" acts as an intermediate layer. This enables
segregation of the parsing logic into it's own module under basalt-core lib.
use basalt_core::markdown::{from_str, Node, HeadingLevel, Text};
let markdown = "# My Heading\n\nSome text.";
let nodes = from_str(markdown);
assert_eq!(nodes, vec![
Node::Heading {
level: HeadingLevel::H1,
text: Text::from("My Heading"),
},
Node::Paragraph {
text: Text::from("Some text."),
},
])