pub struct ScanMARC {
output: Option<PathBuf>,
prefix: Option<String>,
book_mode: bool,
line_mode: bool,
glob: Option<String>,
files: Vec<PathBuf>,
}Expand description
Scan MARC records and extract basic information.
This tool scans MARC-XML records, in either raw or delimited-line format, and writes the fields to a Parquet file of flat field records. It has two modes: normal, which simply writes MARC fields to the Parquet file, and ‘book mode’, which only saves books and produces additional output files summarizing book record information and book ISBNs.
Fields§
§output: Option<PathBuf>Output files for normal mode.
prefix: Option<String>Prefix for output files in book mode.
book_mode: boolTurn on book mode.
line_mode: boolRead in line mode
glob: Option<String>Glob for files to parse.
files: Vec<PathBuf>Input files to parse (GZ-compressed)
Implementations§
Source§impl ScanMARC
impl ScanMARC
fn find_files(&self) -> Result<Vec<PathBuf>>
fn process_records<W: ObjectWriter<MARCRecord> + Send + Sync + 'static>( &self, output: W, ) -> Result<()>
Trait Implementations§
Source§impl Args for ScanMARC
impl Args for ScanMARC
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
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl From<ScanMARC> for RootCommand
impl From<ScanMARC> for RootCommand
Source§fn from(v: ScanMARC) -> RootCommand
fn from(v: ScanMARC) -> RootCommand
Converts to this type from the input type.
Source§impl FromArgMatches for ScanMARC
impl FromArgMatches for ScanMARC
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>
Assign values from
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>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for ScanMARC
impl RefUnwindSafe for ScanMARC
impl Send for ScanMARC
impl Sync for ScanMARC
impl Unpin for ScanMARC
impl UnwindSafe for ScanMARC
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more