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: bool
Turn on book mode.
line_mode: bool
Read 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> + DataSink + Send + Sync + 'static>( &self, output: W, ) -> Result<()>
Trait Implementations§
Source§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