summaryrefslogtreecommitdiff
path: root/src/cmd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd.rs')
-rw-r--r--src/cmd.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cmd.rs b/src/cmd.rs
index da917ee..2f2f626 100644
--- a/src/cmd.rs
+++ b/src/cmd.rs
@@ -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,