Add a work in progress implementation of the cycle message

This commit is contained in:
Campbell Alden 2023-07-21 19:47:55 +09:00
parent 8ad7a2c4e6
commit 4eea2ac43b
3 changed files with 43 additions and 3 deletions

View file

@ -54,10 +54,14 @@ impl Task {
}
/// Get all tasks in the logbook list from Things
pub fn logbook() -> Result<Vec<Task>> {
pub fn logbook_today() -> Result<Vec<Task>> {
Task::from_script(include_bytes!("logbook.js"))
}
pub fn logbook_this_cycle() -> Result<Vec<Task>> {
Task::from_script(include_bytes!("logbook_cycle.js"))
}
pub fn has_tag(&self, tag: &str) -> bool {
self.tags.contains(&String::from(tag))
}