Skip to main content

MarkdownArgs

Struct MarkdownArgs 

Source
pub struct MarkdownArgs {
Show 14 fields pub from: Option<Format>, pub to: Option<Format>, pub track_changes: TrackChanges, pub keep_nested_comment: bool, pub no_critic: bool, pub reference_doc: Option<PathBuf>, pub resource_path: Option<PathBuf>, pub author: Option<String>, pub datetime: Option<String>, pub page: Page, pub tracking: Option<Tracking>, pub scholar: bool, pub no_page_markers: bool, pub commonmark: bool,
}
Expand description

convert’s format and Markdown flags.

Fields§

§from: Option<Format>

Input format [default: from the file: .md and .markdown are Markdown, a zip is Word].

§to: Option<Format>

Output format [default: from –output, else pdf for Word and docx for Markdown].

§track_changes: TrackChanges

Keep tracked changes (all), or write the document with every change accepted or rejected (pandoc’s flag): CriticMarkup in Markdown, Word’s revisions in a .docx. With –to md, the Markdown itself is resolved.

§keep_nested_comment: bool

Keep comments and replies whose whole anchor is removed; requires –track-changes accept or reject.

§no_critic: bool

Markdown: read {++, {-- and the other CriticMarkup delimiters as text.

§reference_doc: Option<PathBuf>

Markdown to Word: take styles, numbering, page setup, headers and footers from this .docx (pandoc’s –reference-doc).

§resource_path: Option<PathBuf>

Markdown to Word: where images are found [default: the Markdown file’s directory]. 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.

§author: Option<String>

Markdown to Word: author of the tracked changes and comments that name none [default: the front matter’s author:, else the –reference-doc’s creator, else Jubarte].

§datetime: Option<String>

Markdown to Word: timestamp (ISO 8601) of the tracked changes and comments that carry none [default: the front matter’s last_modified:/modified:/date:/created:, else the –reference-doc’s creation time, else now]; pin it (-d 1970-01-01T00:00:00Z) for reproducible output.

§page: Page

Markdown to Word: the page size when there is no –reference-doc (one-inch margins either way); a reference’s page setup wins.

§tracking: Option<Tracking>

Markdown to Word: turn Word’s Track Changes on or off in the .docx written, whatever the Markdown’s track_changes: key says [default: the key; without one, the –reference-doc’s setting, else off].

§scholar: bool

Markdown to Word: set a manuscript as LaTeX’s article class does (Latin Modern Roman 10pt on 12pt lines, justified, bold headings) and number its pages from page 2, centered in the footer. The front matter’s own styles: entries, headers and footers win.

§no_page_markers: bool

Word to Markdown: leave out the <!-- page N of M --> lines, and the layout pass that places them.

§commonmark: bool

Word to Markdown: write plain CommonMark with CriticMarkup for readers outside jubarte’s dialect, instead of the agent view (jubarte read’s YAML header and id lines). Fields print as their text, and underline, highlight and strike are left out.

Trait Implementations§

Source§

impl Args for MarkdownArgs

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 MarkdownArgs

Source§

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

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

impl FromArgMatches for MarkdownArgs

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 MarkdownArgs

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.