1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! Extract Emacs Org-mode tasks from markdown files.
//!
//! This is the library behind the `markdown-org-extract` command-line tool.
//! Both entry points run the same code: the binary parses arguments and writes
//! bytes, everything below that line lives here. See [`README.md`] at the
//! repository root for the user-facing description of the format itself.
//!
//! # Pipeline
//!
//! A run is two steps, and they are separate so a caller can hold on to the
//! tasks and build several agendas from one scan:
//!
//! 1. [`scan_directory`] walks a directory and returns every [`Task`] it finds.
//! 2. [`filter_agenda`] turns those tasks into an [`AgendaOutput`] for a given
//! [`AgendaScope`] and date window.
//!
//! ```no_run
//! use markdown_org_extract::{filter_agenda, scan_directory, AgendaDates, AgendaScope, ScanOptions};
//!
//! # fn main() -> Result<(), markdown_org_extract::AppError> {
//! let outcome = scan_directory("notes".as_ref(), &ScanOptions::default(), None)?;
//! let agenda = filter_agenda(
//! outcome.tasks,
//! AgendaScope::Day,
//! AgendaDates::default(),
//! "Europe/Moscow",
//! false,
//! false,
//! true,
//! )?;
//! # let _ = agenda;
//! # Ok(())
//! # }
//! ```
//!
//! # Determinism
//!
//! Nothing here reads the wall clock unless it has to: `AgendaDates::current_date`
//! overrides "today" so a caller can render the agenda as it would look on any
//! date. Consumers are expected to pass it rather than rely on the host clock.
//!
//! [`README.md`]: https://github.com/VitalyOstanin/markdown-org-extract
// The flat facade is the surface embedders are expected to use; the modules
// stay public so anything not re-exported here is still reachable without
// waiting for a release.
pub use crate;
pub use crateAppError;
pub use crateHolidayCalendar;
pub use crateget_weekday_mappings;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;