calternal_notes_core::composer
One-line composer parser. Explicit Log prefixes use the Daily note parser; other natural times and Tags use exact source spans so title words stay put.
Source: crates/calternal-notes-core/src/composer.rs
Structs
Section titled “Structs”ComposerEntry
Section titled “ComposerEntry”pub struct ComposerEntryParsed log entry fields. start uses the host-provided current time when
the line has no explicit time.
Fields
pub start: Stringpub end: Option<String>pub title: Stringpub tags: Vec<String>
Implements: Debug, Clone, PartialEq, Eq
ComposerEntry::into_log_entry
Section titled “ComposerEntry::into_log_entry”pub fn into_log_entry(self) -> LogEntryConsume the Composer result as a new Log entry (#917; DESIGN §38).
Keep start, end, title, and Tags. LogEntry::new supplies an empty
identity and attachments, with no place or time zone.
Source: crates/calternal-notes-core/src/composer.rs:11
ComposerParse
Section titled “ComposerParse”pub struct ComposerParseFull composer projection. It keeps the familiar Log entry fields and adds the date and classification signals used by task and reminder capture.
Fields
pub start: Stringpub end: Option<String>pub title: Stringpub tags: Vec<String>pub date: Option<String>pub since: Option<String>pub until: Option<String>pub duration_minutes: Option<u32>pub mode: Stringpub crosses_midnight: bool
Implements: Debug, Clone, PartialEq, Eq
ComposerParse::into_log_entry
Section titled “ComposerParse::into_log_entry”pub fn into_log_entry(self) -> LogEntryConsume the Composer result as a new Log entry (#917; DESIGN §38).
Keep start, end, title, and Tags. LogEntry::new supplies an empty
identity and attachments, with no place or time zone.
Source: crates/calternal-notes-core/src/composer.rs:21
ComposerSplit
Section titled “ComposerSplit”pub struct ComposerSplitNo doc comment.
Fields
pub title: Stringpub body: String
Implements: Debug, Clone, PartialEq, Eq
Source: crates/calternal-notes-core/src/composer.rs:35
NoteTitleTags
Section titled “NoteTitleTags”pub struct NoteTitleTagsNo doc comment.
Fields
pub title: Stringpub tags: Vec<String>
Implements: Debug, Clone, PartialEq, Eq
Source: crates/calternal-notes-core/src/composer.rs:41
Functions
Section titled “Functions”note_title_tags
Section titled “note_title_tags”pub fn note_title_tags(line: &str) -> NoteTitleTagsStrip every Tag token from a Note title line. Time-shaped numbers remain title text because Notes do not consume event or Task recognizers. Values dedupe in NFC form, while every source span is removed (#473).
Source: crates/calternal-notes-core/src/composer.rs:81
parse_composer
Section titled “parse_composer”pub fn parse_composer(input: &str, now: &str) -> ComposerParseParse one composer line through the full reference NLP pipeline.
The JavaScript composer commits an entry to the current Daily note when no
time token appears. This adapter therefore uses the time from the supplied
now value while retaining the same date as the default day. It does not
read the process clock. Explicit leading Log times use the Daily note grammar
so imports, previews and writes agree (#724).
Source: crates/calternal-notes-core/src/composer.rs:225
parse_composer_entry
Section titled “parse_composer_entry”pub fn parse_composer_entry(input: &str, now: &str) -> ComposerEntryParse one natural-text composer line.
Source: crates/calternal-notes-core/src/composer.rs:140
split_composer_input
Section titled “split_composer_input”pub fn split_composer_input(text: &str) -> ComposerSplitSplit a multi-line capture into its first non-blank title line and body. CRLF and CR are normalized before the body is trimmed at blank edges.
Source: crates/calternal-notes-core/src/composer.rs:48
suggest_log_line
Section titled “suggest_log_line”pub fn suggest_log_line(raw: &str) -> Option<String>Suggest a canonical Log line for a malformed top-level Log bullet.
A suggestion needs an explicit time and a non-empty title. A missing time would make the parser use the current clock, which is unsafe for repair.