pub struct EditOptions {
pub author: String,
pub author_given: bool,
pub datetime: Option<String>,
pub suggesting_mode: bool,
pub editing_mode: bool,
pub existing_revisions: ExistingArg,
pub in_place: bool,
pub output: Option<PathBuf>,
pub out_dir: Option<Option<PathBuf>>,
pub force: bool,
}Expand description
Options edit and add share.
Fields§
Author of the changes and comments (operation flags; a plan names its own). A write that adds markup needs it spelled here or in JUBARTE_AUTHOR.
Whether -a/--author was spelled on the command line (set after
parsing). One-shot writes use this to say when the default signed
the new markup (#1891).
datetime: Option<String>Revision timestamp (ISO 8601) [default: now, UTC]; pin it for reproducible output.
suggesting_mode: boolThe edits are tracked changes (the default): the file written is the redline and the view shows the marks.
editing_mode: boolThe edits land directly: the file written is the result, and the view shows it with rev tags on the id lines.
existing_revisions: ExistingArgWhat to do when FILE already holds tracked changes: auto keeps them and tracks the new edits beside them; a clean file goes through the comparer.
in_place: boolReplace FILE through the same atomic write as -o. A refused edit or a failed check leaves FILE unchanged. Not with -o or –out-dir.
output: Option<PathBuf>The edited document, a .docx (default: <FILE's directory>/<stem>_modified.docx). Any other extension is written as
a .docx too; .md, .json, .pdf and .png name the task that writes them.
out_dir: Option<Option<PathBuf>>Write the bundle instead: clean.docx, redline.docx, patch.diff and
report.jsonl (clean.docx and report.jsonl in editing mode) in DIR
(default: <FILE's directory>/<stem>.edit).
force: boolReplace an existing output (the bundle directory’s files).
Implementations§
Source§impl EditOptions
impl EditOptions
Sourcepub fn target(&self, file: &Path) -> EditTarget
pub fn target(&self, file: &Path) -> EditTarget
Where edit FILE (or add FILE) writes: --in-place replaces
FILE, else --out-dir [DIR]’s bundle, else -o, else <FILE's dir>/<stem>_modified.docx. A FILE whose stem already ends in
_modified keeps its name. Pure.
Trait Implementations§
Source§impl Args for EditOptions
impl Args for EditOptions
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Debug for EditOptions
impl Debug for EditOptions
Source§impl FromArgMatches for EditOptions
impl FromArgMatches for EditOptions
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.