@@ -4,7 +4,7 @@ use cli::{Arg, Cli, Command};
44
55fn main ( ) {
66 let cli = Cli :: new ( ) . with_default_command ( "help" ) . with_commands ( vec ! [
7- Command :: new( "version" , "Displays the current version of fmap " ) . with_short( 'v' ) ,
7+ Command :: new( "version" , "Displays the current version of github-stats " ) . with_short( 'v' ) ,
88 Command :: new( "install" , "Installs the files and directories" ) ,
99 Command :: new( "all" , "Gives all stats found on a repository as json" )
1010 . with_arg(
@@ -30,6 +30,13 @@ fn main() {
3030 . with_long( "output" )
3131 . with_value_name( "OUTPUT" )
3232 . with_help( "File path to save the json" ) ,
33+ )
34+ . with_arg(
35+ Arg :: new( )
36+ . with_name( "display" )
37+ . with_short( 'd' )
38+ . with_long( "display" )
39+ . with_help( "Converts the json to an easier format (will remove some data)." ) ,
3340 ) ,
3441 Command :: new( "downloads" , "Gives download count of releases as json" )
3542 . with_arg(
@@ -69,6 +76,13 @@ fn main() {
6976 . with_long( "output" )
7077 . with_value_name( "OUTPUT" )
7178 . with_help( "File path to save the json" ) ,
79+ )
80+ . with_arg(
81+ Arg :: new( )
82+ . with_name( "display" )
83+ . with_short( 'd' )
84+ . with_long( "display" )
85+ . with_help( "Converts the json to an easier format (will remove some data)." ) ,
7286 ) ,
7387 Command :: new(
7488 "releases" ,
@@ -97,6 +111,13 @@ fn main() {
97111 . with_long( "output" )
98112 . with_value_name( "OUTPUT" )
99113 . with_help( "File path to save the json" ) ,
114+ )
115+ . with_arg(
116+ Arg :: new( )
117+ . with_name( "display" )
118+ . with_short( 'd' )
119+ . with_long( "display" )
120+ . with_help( "Converts the json to an easier format (will remove some data)." ) ,
100121 ) ,
101122 Command :: new( "help" , "Helps you with the commands" ) . with_short( 'h' ) ,
102123 ] ) ;
@@ -109,18 +130,21 @@ fn main() {
109130 let owner = command. get_value_of ( "owner" ) . throw_if_none ( ) ;
110131 let repo = command. get_value_of ( "repository" ) . throw_if_none ( ) ;
111132 let output = command. get_value_of ( "output" ) . to_option ( ) ;
133+ let display = command. has ( "display" ) ;
112134 }
113135 "downloads" => {
114136 let owner = command. get_value_of ( "owner" ) . throw_if_none ( ) ;
115137 let repo = command. get_value_of ( "repository" ) . throw_if_none ( ) ;
116138 let individual = command. has ( "individual" ) ;
117139 let link = command. has ( "link" ) ;
118140 let output = command. get_value_of ( "output" ) . to_option ( ) ;
141+ let display = command. has ( "display" ) ;
119142 }
120143 "releases" => {
121144 let owner = command. get_value_of ( "owner" ) . throw_if_none ( ) ;
122145 let repo = command. get_value_of ( "repository" ) . throw_if_none ( ) ;
123146 let output = command. get_value_of ( "output" ) . to_option ( ) ;
147+ let display = command. has ( "display" ) ;
124148 }
125149 "help" => cli. help ( ) ,
126150 _ => cli. help ( ) ,
0 commit comments