Expand description
Core data model and parser for Lepiter knowledge bases stored as page JSON files.
§Scope
- Scans a Lepiter directory and builds a metadata index keyed by page id.
- Loads and parses individual pages lazily by id.
- Converts page snippet trees into a stable block-oriented node model.
- Preserves unknown node types as
Node::Unknownto keep consumers resilient.
§Example
use lepiter_core::KnowledgeBase;
let index = KnowledgeBase::open("./lepiter")?;
for page in index.sorted_pages_by_title() {
println!("{} - {}", page.id, page.title);
}Structs§
- Knowledge
Base - Entry point for opening a Lepiter knowledge base directory.
- Knowledge
Base Index - Indexed knowledge base metadata with lazy page loading.
- Page
- Fully parsed page content.
- Page
Meta - Metadata for a page discovered during index scanning.
- Parse
Issue - Non-fatal parse/indexing issue associated with a source file.
- Search
Hit - Search result entry for one page.
Enums§
- Link
Target Kind - Classification of a raw link target.
- Node
- Block-oriented normalized node model used by consumers (e.g. TUI).
- Search
Match Kind - Match category for search results.
- Title
Resolution - Result of resolving a page by title.
Functions§
- collect_
node_ types_ in_ file - Collects all observed
type/__typevalues and their counts in one page file. - render_
nodes_ to_ text - Renders normalized nodes to plain text.
- render_
page_ to_ text - Renders a parsed page to plain text.
Type Aliases§
- PageId
- Canonical page identifier used throughout the API.