A file-based task manager

FIX: modify time not in index

+14 -11
+10 -10
.tsk/index
··· 1 - tsk-10 foreign workspaces 2 - tsk-21 Add command to setup git stuff 3 - tsk-8 IMAP4-based sync 4 - tsk-17 Add reopen command 5 - tsk-16 Add ability to search archived tasks with find command 6 - tsk-15 Add link identification to tasks 7 - tsk-9 fix timestamp storage and parsing 8 - tsk-7 allow for creating tasks that don't go to top of stack 9 - tsk-13 user-defined labels 10 - tsk-18 Add reindex command 1 + tsk-21 Add command to setup git stuff 1732399520 2 + tsk-8 IMAP4-based sync 1728535307 3 + tsk-17 Add reopen command 1731441422 4 + tsk-16 Add ability to search archived tasks with find command 1731441422 5 + tsk-15 Add link identification to tasks 1731441422 6 + tsk-9 fix timestamp storage and parsing 1728534908 7 + tsk-10 foreign workspaces 1728534609 8 + tsk-7 allow for creating tasks that don't go to top of stack 1728426156 9 + tsk-13 user-defined labels 1728759002 10 + tsk-18 Add reindex command 1731441422
+2
src/errors.rs
··· 27 27 #[allow(dead_code)] 28 28 #[error("An unexpected error occurred: {0}")] 29 29 Oops(Box<dyn std::error::Error>), 30 + #[error("System time/clock error: {0}")] 31 + SystemTime(#[from] std::time::SystemTimeError), 30 32 } 31 33 32 34 impl From<Infallible> for Error {
+2 -1
src/stack.rs
··· 142 142 self.file.seek(std::io::SeekFrom::Start(0))?; 143 143 self.file.set_len(0)?; 144 144 for item in self.all.iter() { 145 - self.file.write_all(format!("{item}\n").as_bytes())?; 145 + let time = item.modify_time.duration_since(UNIX_EPOCH)?.as_secs(); 146 + self.file.write_all(format!("{item}\t{}\n", time).as_bytes())?; 146 147 } 147 148 Ok(()) 148 149 }