]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/status/mod.rs
Generate and archive blog, allow publishing
[rbdr/blog] / src / command / status / mod.rs
index ba73184733ac159b7fd008b8f6a47545d0516d2b..e620f78f8c8615fbe69c651a04552de28bec59dc 100644 (file)
@@ -1,6 +1,8 @@
 mod configuration_status;
+mod blog_status;
 
 use std::io::Result;
+use crate::configuration::Configuration;
 
 pub struct Status;
 
@@ -15,10 +17,10 @@ impl super::Command for Status {
         vec![]
     }
 
-    fn execute(&self, _: Option<&String>) -> Result<()> {
+    fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> {
         let status_providers = available_status_providers();
         for status_provider in status_providers {
-            println!("{}", status_provider());
+            println!("{}\n----\n", status_provider(configuration));
         }
         return Ok(())
     }
@@ -36,8 +38,9 @@ impl super::Command for Status {
     }
 }
 
-fn available_status_providers() -> Vec<fn() -> String> {
+fn available_status_providers() -> Vec<fn(&Configuration) -> String> {
     vec![
         configuration_status::status,
+        blog_status::status,
     ]
 }