diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-07-15 17:34:08 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-07-15 17:34:08 +0300 |
commit | 80bd48f44c1ba6c5010f7d50fd9387b1c4424464 (patch) | |
tree | 94381a10bea6990ca5d017bb9067749f17ce614c /src/cmd.rs | |
parent | 0f3eeccc4403ddf27ad4e7cdffb8033dcab5f9cf (diff) | |
download | jt2-80bd48f44c1ba6c5010f7d50fd9387b1c4424464.tar.gz |
feat: add command to list current drafts
Sponsored-by: author
Diffstat (limited to 'src/cmd.rs')
-rw-r--r-- | src/cmd.rs | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -62,6 +62,17 @@ impl New { } #[derive(Debug, StructOpt)] +pub struct List {} + +impl List { + pub fn run(&self, config: &Configuration) -> Result<(), JournalError> { + let journal = Journal::new(&config.dirname, &config.entries)?; + journal.list_drafts()?; + Ok(()) + } +} + +#[derive(Debug, StructOpt)] pub struct NewTopic { #[structopt(help = "Path to topic page in journal")] path: PathBuf, |