doing_taskpaper/lib.rs
1//! TaskPaper document parser and serializer for the doing CLI.
2//!
3//! This crate implements the document model that backs the doing file format.
4//! A doing file is a subset of the [TaskPaper](https://www.taskpaper.com/) format:
5//! sections (headers ending with `:`) contain entries (lines starting with `- `),
6//! each with tags (`@name` or `@name(value)`) and optional indented notes.
7//!
8//! # Document model
9//!
10//! - [`Document`] — an ordered list of [`Section`]s with methods for querying,
11//! mutating, and persisting entries.
12//! - [`Section`] — a named group of entries (e.g. "Currently", "Done").
13//! - [`Entry`] — a single time-tracked item with a date, title, [`Tags`], and [`Note`].
14//! - [`Tags`] — an ordered collection of [`Tag`] key-value pairs.
15//!
16//! # File I/O
17//!
18//! - [`create_file`] — create a new doing file with a default section.
19//! - [`read_file`] — parse an on-disk file into a [`Document`].
20//! - [`write_file`] — atomically write a [`Document`] back to disk.
21//! - [`serialize`] — render a [`Document`] to its TaskPaper string representation.
22
23pub mod document;
24pub mod entries;
25pub mod io;
26mod note;
27mod parser;
28pub mod section;
29pub mod serializer;
30mod tags;
31
32pub use document::Document;
33pub use entries::Entry;
34pub use io::{create_file, read_file, write_file};
35pub use note::Note;
36pub use parser::DEFAULT_SECTION;
37pub use section::Section;
38pub use serializer::serialize;
39pub use tags::{Tag, Tags};