Update command line about notice, add donate link

This commit is contained in:
timvisee 2020-09-21 12:09:48 +02:00
parent 56ab026d22
commit 3d60493573
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
2 changed files with 14 additions and 7 deletions

View file

@ -39,6 +39,15 @@ lazy_static! {
/// The default client transfer timeout in seconds as a string
static ref DEFAULT_TRANSFER_TIMEOUT: String = format!("{}", CLIENT_TRANSFER_TIMEOUT);
/// The about notice in command output.
static ref APP_ABOUT: String = format!(
"{}\n\n\
The default public Send host is provided by Tim Visee, @timvisee.\n\
Please consider to donate and help keep it running: https://vis.ee/donate\
",
crate_description!(),
);
}
/// CLI argument handler.
@ -54,13 +63,8 @@ impl<'a: 'b, 'b> Handler<'a> {
let app = App::new(crate_name!())
.version(crate_version!())
.author(crate_authors!())
.about(crate_description!())
.after_help(
"\
The public Send service that is used as default host is provided by Mozilla.\n\
This application is not affiliated with Mozilla, Firefox or Firefox Send.\
",
)
.about(APP_ABOUT.as_ref())
.after_help("This application is not affiliated with Firefox or Firefox Send.")
.global_setting(AppSettings::GlobalVersion)
.global_setting(AppSettings::VersionlessSubcommands)
// TODO: enable below command when it doesn't break `p` anymore.

View file

@ -174,6 +174,9 @@ pub fn print_main_info() -> ! {
println!();
println!("To show all subcommands, features and other help:");
println!(" {}", highlight(&format!("{} help [SUBCOMMAND]", bin)));
println!();
println!("The default public Send host is provided by Tim Visee.");
println!("Please consider to donate and help keep it running: https://vis.ee/donate");
process::exit(1)
}