Expand description
Knowledge refactoring, concept relocation, deletion, splitting, and merging.
Refactoring a concept graph requires maintaining link integrity across the entire bundle:
move_concept: Moves/renames a concept, rewrites all incoming backlinks across the bundle, and rebases outgoing relative links and frontmatter paths.remove_concept: Safely deletes a concept, checking for inbound links and optionally redirecting or unlinking them.split_concept: Extracts a section/heading into a new concept, moves relevant footnote citations/sources, and links to the new concept.merge_concepts: Consolidates two concepts, merging bodies, sources, and verification events, while redirecting incoming backlinks.
Re-exports§
pub use crate::log::append_log_entry;pub use crate::markdown::LinkRewriteAction;pub use crate::markdown::heading_slug;pub use crate::markdown::matches_heading;pub use crate::markdown::rewrite_markdown_links;
Structs§
- Merge
Options - Options for merging one concept into another.
- Merge
Report - Summary report of a merge operation.
- Move
Options - Options for moving or renaming a concept.
- Move
Report - Summary report of a move/rename operation.
- Remove
Options - Options for removing a concept.
- Remove
Report - Summary report of a removal operation.
- Rename
Section Options - Options for renaming a section heading within a concept.
- Rename
Section Report - Summary report of a section rename operation.
- Split
Options - Options for splitting a concept section into a new concept.
- Split
Report - Summary report of a split operation.
Enums§
- Refactor
Error - Error returned when a refactoring operation fails.
Functions§
- compute_
relative_ path - Computes the relative markdown link path from
from_concepttoto_concept. - merge_
concepts - Merges
sourceconcept intotargetconcept and deletessource. - move_
concept - Moves or renames a concept, rewriting all incoming links and rebasing outgoing links.
- rebase_
relative_ path - Rebases a relative file/resource path from
old_dirtonew_dir. - remove_
concept - Safely removes a concept from the bundle.
- rename_
section - Renames a section heading within a concept and updates all internal and external anchor links.
- split_
concept - Splits a section from an existing concept into a new concept.