title: Diaryx Core Library
author: adammharris
audience:
- public
part_of: ../../README.md
Diaryx Core Library
This is the diaryx_core library! It contains shared code for the Diaryx clients.
NOTE: this README is not finished yet!
Provided functionality
Managing frontmatter
Full key-value operations for managing frontmatter properties:
set_frontmatter_propertyget_frontmatter_propertyrename_frontmatter_propertyremove_frontmatter_propertyget_all_frontmatter
Also, sorting frontmatter properties:
sort_frontmattersort_alphabeticallysort_by_pattern
Managing file content
Operations for managing content of markdown files separate from frontmatter:
set_contentget_contentappend_contentclear_content
Search
Search frontmatter or content separately:
SearchQuery::contentSearchQuery::frontmatter
Export
use ;
use RealFileSystem;
use Path;
let workspace_root = new;
let audience = "public";
let destination = new;
let fs = RealFileSystem;
let exporter = new;
let plan = match exporter.plan_export ;
let force = false;
let keep_audience = false;
let options = ExportOptions ;
match exporter.execute_export