Skip to main content

CompareArgs

Struct CompareArgs 

Source
pub struct CompareArgs {
Show 18 fields pub original_pos: Option<PathBuf>, pub modified_pos: Option<PathBuf>, pub original: Option<PathBuf>, pub modified: Option<PathBuf>, pub output: Option<PathBuf>, pub author: String, pub datetime: Option<String>, pub force: bool, pub detail_threshold: Option<f64>, pub mode: CompareMode, pub powertools_faithful: bool, pub no_paragraph_merge: bool, pub reference_doc: Option<PathBuf>, pub critic: bool, pub resource_path: Option<PathBuf>, pub render: RenderArgs, pub read: ReadArgs, pub view_given: bool,
}
Expand description

Inputs and settings shared by explicit and shorthand comparisons.

Fields§

§original_pos: Option<PathBuf>

The original / base document (.docx or Markdown).

§modified_pos: Option<PathBuf>

The modified document (.docx or Markdown).

§original: Option<PathBuf>

Original/base document (overrides the positional ORIGINAL).

§modified: Option<PathBuf>

Modified document (overrides the positional MODIFIED).

§output: Option<PathBuf>

Write the redline to FILE instead of printing its agent view; the extension picks the format: .docx (also any other), .md (the agent view; CriticMarkup when both documents are Markdown), .pdf, .png (one file per page) or .json (the snapshot).

§author: String

Author name recorded on the revisions.

§datetime: Option<String>

Revision timestamp (ISO 8601) [default: now, UTC]; pin it for reproducible output.

§force: bool

Overwrite the output file if it already exists.

§detail_threshold: Option<f64>

Word-match detail, from 0 to 1 [default: 0.02; powertools: 0.15].

§mode: CompareMode

Compare like Microsoft Word or Open-Xml-PowerTools.

§powertools_faithful: bool

Same as –mode powertools.

§no_paragraph_merge: bool

DEBUG: zero WmlComparerSettings::merge_replaced_paragraphs — the word-visual UMBRELLA gate — which disables the WHOLE word-visual pass family (merge, flatten, reorder, margins, …), not just the paragraph merge (pagination experiments; hidden). Redundant with –powertools-faithful, which sets the same preset.

§reference_doc: Option<PathBuf>

Two Markdown documents written as Word take styles, page setup, headers and footers from this .docx.

§critic: bool

Read CriticMarkup in the Markdown documents as tracked changes. By default a document compared is text.

§resource_path: Option<PathBuf>

Where images named by the Markdown are found (default: the original’s directory when it is Markdown, else the modified’s). Only images that resolve inside that directory are read, symlinks resolved; a URL or a path out of it is written as its alt text, with a warning that says why.

§render: RenderArgs

How a .pdf or .png output is drawn.

§read: ReadArgs

The options of the agent view printed without -o (or written to FILE.md); jubarte FILE’s too.

§view_given: bool

Whether the command line spells out any of read’s options (set after parsing): a .md of two Markdown documents is CriticMarkup, which they cannot shape.

Trait Implementations§

Source§

impl Args for CompareArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for CompareArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for CompareArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Serialize for CompareArgs

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.