pub struct ReadArgs {Show 24 fields
pub track_changes: Option<TrackChanges>,
pub comments: CommentsArg,
pub dates: bool,
pub no_page_markers: bool,
pub paragraphs: Vec<String>,
pub head: Option<usize>,
pub tail: Option<usize>,
pub changed: bool,
pub by: Option<String>,
pub json: bool,
pub tables: bool,
pub for_edit: bool,
pub accept_change: Vec<String>,
pub reject_change: Vec<String>,
pub existing_revisions: Option<ExistingArg>,
pub track: Option<TrackArg>,
pub find: Option<String>,
pub regex: Option<String>,
pub ignore_case: bool,
pub context: Option<usize>,
pub limit: Option<usize>,
pub max_chars: Option<usize>,
pub cursor: Option<String>,
pub all: bool,
}Expand description
Options of read.
Fields§
§track_changes: Option<TrackChanges>Tracked changes inline (all, the default), or the text with every
change accepted or rejected (also spelled accepted, rejected); the
id lines then list what changed. –json and –tables read the
accepted text, or under reject the rejected one, every paragraph
keeping its id; the snapshot names an accept or a reject in
track_changes.
comments: CommentsArgComments inline (default) or hidden, with their ids on the id line of the paragraph that holds them; ignored by –json, –for-edit and the –tables grids.
dates: boolTimestamps on the notes of an author whose changes do not all share one (the header shows an author’s single timestamp); ignored by –json, –for-edit and the –tables grids.
no_page_markers: boolSkip the layout pass; page count from Word’s cached breaks, no
<!-- page N of M --> lines; ignored by –json, –for-edit and the
–tables grids.
paragraphs: Vec<String>Only these blocks: p5, p4-p7, t0, comma-separated (open-ended
p17- / -p3 spellings still parse, transitionally; the 17 October
2026 contract retires them — spell the end, p17-p20). With –tables,
select top-level tables (including their nested tables) by the same
tN as the view, or by a pN inside them; a pick that reaches no table
is refused. Print their grid, then a blank line and the same view as
read -p SPEC. Repeat it to add blocks: -p p3 -p p8 reads as
-p p3,p8.
head: Option<usize>Only the first N blocks (a table is one block).
tail: Option<usize>Only the last N blocks.
changed: boolOnly the blocks with a tracked change or a comment.
by: Option<String>With –changed: only the blocks with this author’s marks (a handle such as AC, or the full name).
json: boolPrint the snapshot as JSON instead of the view: schema_version,
source_sha256, summary, paragraphs, stories, tables,
controls, changes and comments. -p, –head, –tail, –changed
and –by keep the body paragraphs they select, and every change and
comment that starts in one of them, whoever made it; the rest of the
snapshot stays whole. –track-changes accept or reject settles the
text.
tables: boolPrint each top-level body table as a grid: a table N: ROWSxCOLS header_rows=H widths=W,... line, then one line per row of
tab-separated ids=text cells. Use -p t0,t2 or -p pN (a cell
paragraph) to select top-level tables and all their nested tables,
in document order, each once. tN is the view’s top-level index;
nested entries follow their cell row, indented two spaces per level,
labelled nested in t0.row2.cell0 (recursively, e.g.
t0.row2.cell0.t0.row0.cell1). A pN or a range selects the tables
that hold its paragraphs; one that reaches no table is refused.
With -p, follow the selected grids with a blank line and the same
view as read -p SPEC, including its YAML header. Without -p, print
only the inventory. –track-changes reject reads the rejected text.
for_edit: boolThe working document template/apply derive, as JSON: source hash,
paired target ids, exact logical working text with before_sha256
and readiness per operation and range. The selection (-p/–select,
–head, –tail, –changed, –by, –find, –regex) resolves on the
original source and freezes before the decisions settle it. Given
filters narrow together: a paragraph is selected only when every
filter given matches it, and an empty result names the filters
applied in coverage.omissions.
accept_change: Vec<String>–for-edit: the working view after accepting this revision (repeatable; it does not modify FILE).
reject_change: Vec<String>–for-edit: the working view after rejecting this revision (repeatable; it does not modify FILE).
existing_revisions: Option<ExistingArg>–for-edit: the remaining-revision policy of the working basis (default keep, matching new plans).
track: Option<TrackArg>–for-edit: readiness for tracked (on, the default) or direct (off) new edits.
find: Option<String>Print matching body paragraphs only, with the same Markdown and id lines as -p. Searches original final logical text, as –for-edit does; combined filters narrow. Like -p, the view cannot select paragraphs in headers, footers, footnotes, endnotes and comments. Use –for-edit for header/footer/note paragraphs. No match prints nothing and reports it on stderr.
regex: Option<String>Search with a regular expression instead of literal text (view or –for-edit). Give PATTERN here and omit –find.
ignore_case: boolCase-insensitive –find/–regex (view or –for-edit).
context: Option<usize>–for-edit: this many read-only original-source neighbours around each row.
limit: Option<usize>–for-edit: primary records a page returns (default 100).
max_chars: Option<usize>–for-edit: the text budget a page shares (default 24000); a truncated row’s preview is never complete text.
cursor: Option<String>–for-edit: continue an earlier bounded query (bound to its source, selection, filters and working basis).
all: bool–for-edit: no presentation limits (admission limits still hold).
Implementations§
Source§impl ReadArgs
impl ReadArgs
Sourcepub fn paragraph_spec(&self) -> Option<String>
pub fn paragraph_spec(&self) -> Option<String>
The -p selectors as one comma list: -p p3 -p p8 reads as
-p p3,p8 (#1690). None without -p. ReadArgs::paragraphs
holds one entry per -p as typed; the facade JSON carries this
joined list as one string (null without -p).
Sourcepub fn for_edit_request(&self) -> ForEditRequest
pub fn for_edit_request(&self) -> ForEditRequest
The read --for-edit request these flags describe (V2-10): the
working basis template and apply derive — auto (and the absence
of the flag) keeps the remaining revisions, on tracks new edits.
read --for-edit keeps the open-ended range spellings its help
documents; the bindings build the same request through this.
Trait Implementations§
Source§impl Args for ReadArgs
impl Args for ReadArgs
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 FromArgMatches for ReadArgs
impl FromArgMatches for ReadArgs
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.