pub const DIA_ARGS_FILE_FORMAT: &str = "Argument file format:\n\n- Empty lines or lines starting with `#` will be ignored.\n- Each command, argument, or option must be placed on a separate line.\n- Option key and value are separated by either: equal symbol `=` (can have leading/trailing white spaces), or at least one white space. Key and value will be trimmed.";Expand description
§Description of argument file format, in English
This constant can be useful if you want to include in your program’s documentation. It has a title and its own content. So you don’t have to prefix with any message/description.
§Examples
use std::borrow::Cow;
use dia_args::{
DIA_ARGS_FILE_FORMAT, DIA_ARGS_FILE_NAME,
docs::{Cfg, Docs, I18n},
};
let docs = format!(
concat!(
// Here is program documentation.
"This program does something.\n\n",
"Options can be set via either command line or from {:?} file at root",
" directory of the program. Options set via command line will",
" override the ones from file.\n\n",
// Here is description of argument file format. Note that we don't need
// a title for it.
"{}",
),
DIA_ARGS_FILE_NAME, DIA_ARGS_FILE_FORMAT,
);
Docs::new(Cow::Borrowed("Some Program"), Cow::Owned(docs)).print()?;