]> git.r.bdr.sh - rbdr/blog/blob - src/command/publish.rs
d8ca9498bc8fc4c883a6392c9cc832fc1ee9afa0
[rbdr/blog] / src / command / publish.rs
1 use std::io::Result;
2
3 pub struct Publish;
4
5 impl Publish {
6 pub fn new() -> Self {
7 Publish
8 }
9 }
10
11 impl super::Command for Publish {
12 fn before_dependencies(&self) -> Vec<Box<dyn super::Command>> {
13 vec![]
14 }
15
16 fn execute(&self, input: Option<&String>) -> Result<()> {
17 println!("Publish: {:?}!", input);
18 return Ok(())
19 }
20
21 fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
22 vec![]
23 }
24
25 fn command(&self) -> &'static str {
26 "publish"
27 }
28
29 fn help(&self) -> &'static str {
30 "<destination>\tPublishes the blog to a remote host."
31 }
32 }