diff --git a/src/uu/basenc/basenc.md b/src/uu/basenc/basenc.md new file mode 100644 index 000000000..17916bd4a --- /dev/null +++ b/src/uu/basenc/basenc.md @@ -0,0 +1,12 @@ +# basenc + +``` +basenc [OPTION]... [FILE]" +``` + +Encode/decode data and print to standard output +With no FILE, or when FILE is -, read standard input. + +When decoding, the input may contain newlines in addition to the bytes of +the formal alphabet. Use --ignore-garbage to attempt to recover +from any other non-alphabet bytes in the encoded stream. diff --git a/src/uu/basenc/src/basenc.rs b/src/uu/basenc/src/basenc.rs index 1bc2aae44..afc25c736 100644 --- a/src/uu/basenc/src/basenc.rs +++ b/src/uu/basenc/src/basenc.rs @@ -19,14 +19,10 @@ use uucore::{ use std::io::{stdin, Read}; use uucore::error::UClapError; -static ABOUT: &str = "\ -Encode/decode data and print to standard output -With no FILE, or when FILE is -, read standard input. +use uucore::{help_about, help_usage}; -When decoding, the input may contain newlines in addition to the bytes of -the formal alphabet. Use --ignore-garbage to attempt to recover -from any other non-alphabet bytes in the encoded stream. -"; +const ABOUT: &str = help_about!("basenc.md"); +const USAGE: &str = help_usage!("basenc.md"); const ENCODINGS: &[(&str, Format)] = &[ ("base64", Format::Base64), @@ -39,8 +35,6 @@ const ENCODINGS: &[(&str, Format)] = &[ ("z85", Format::Z85), ]; -const USAGE: &str = "{} [OPTION]... [FILE]"; - pub fn uu_app() -> Command { let mut command = base_common::base_app(ABOUT, USAGE); for encoding in ENCODINGS {