A file-based task manager

FIX: only display attrs if they exist

+7 -1
+2
.tsk/archive/tsk-6.tsk
··· 1 automatically add backlinks 2
··· 1 automatically add backlinks 2 3 + I need to parse on save/edit/create for outgoing internal links. If any exist and their 4 + corresponding task exists, update the targetted task with a backlink reference
+4
src/attrs.rs
··· 47 } 48 } 49 50 pub(crate) fn iter( 51 &self, 52 ) -> Chain<BTreeMapIter<'_, String, String>, BTreeMapIter<'_, String, String>> {
··· 47 } 48 } 49 50 + pub(crate) fn is_empty(&self) -> bool { 51 + self.updated.is_empty() && self.written.is_empty() 52 + } 53 + 54 pub(crate) fn iter( 55 &self, 56 ) -> Chain<BTreeMapIter<'_, String, String>, BTreeMapIter<'_, String, String>> {
+1 -1
src/main.rs
··· 388 fn command_show(dir: PathBuf, task_id: TaskId, show_attrs: bool) -> Result<()> { 389 let task = Workspace::from_path(dir)?.task(task_id.into())?; 390 // YAML front-matter style. YAML is gross, but it's what everyone uses! 391 - if show_attrs { 392 println!("---"); 393 for (attr, value) in task.attributes.iter() { 394 println!("{attr}: \"{value}\"");
··· 388 fn command_show(dir: PathBuf, task_id: TaskId, show_attrs: bool) -> Result<()> { 389 let task = Workspace::from_path(dir)?.task(task_id.into())?; 390 // YAML front-matter style. YAML is gross, but it's what everyone uses! 391 + if show_attrs && !task.attributes.is_empty() { 392 println!("---"); 393 for (attr, value) in task.attributes.iter() { 394 println!("{attr}: \"{value}\"");