Command-line modules in MARC Report
MARC Report began in the late 90's as a program eager to escape the DOS black-screen environment being left behind by windows users. Now, not quite 15 years later, we find ourselves–to answer the requests of our power-users–converting MARC Report modules into command-line versions one-by-one. Life is strange.
Of course, there's a great reason for command-line modules. They can be scripted, and that in turn makes it possible to automate processing. There's no reason why one's humble windows pc cannot be doing work in the evening when we are relaxing and forgetting about cataloging and databases.
Here is a list of utilities available for download. Most have their own help page in the wiki.
All of the command-line modules distributed with MARC Report share a few common requirements.
First, the modules require that MARC Report be installed on the computer on which they are being run. The reason for this is that the module needs access to our registration process. (This applies to all modules, whether they require registration or not.)
Second, the modules may not be moved out of the installation folder. Therefore, you cannot copy a command-line module to a flash drive, take it to another computer, etc., and expect it to run.
Thus, if you install MARC Report to the default location, either 'cd' to that folder in your script, or load the command-line module with a fully-qualified path. For example
E:\work> "C:\program files\tmq\MARC Report\mrbatch" some-marc-file.mrc
Notice the quotes. They are needed whenever a path contains one or moew blank spaces.
All of the modules support various parameters that should be supplied either on the command-line, or in a plain-text file that ends in the .cfg extension.
Parameters follow the convention of name/value pairs, where the parameter name is followed by '=', then by the parameter value, with no intervening blank spaces. For example:
--marcfilename="C:\Work\my old bib records.mrc"
When parameters are given on the command-line, they must begin with '–', and there can be no line breaks in the command. The opening '–' is optional within a config file. When parameter values (such as filenames) include blank spaces, the value must be enclosed in quotation marks (again, this is not necessary when using a config file).
Finally, parameter names can be shortened to the first four letters of the form given in the documentation; this might be useful on the command-line. Thus the example immediately above could be rewritten
--marc="C:\Work\my old bib records.mrc"