https://consul.stanford.edu/display/LD4P/Linked+Data+for+Production
Code repository to create software that will reify the goals of the initial LD4P Tracer Bullet pathways:
Look through the Ckeys folder and dump the ckeys in the files to Marc in the Marc folder
Gather up all the Marc files and send a concatenated file to a Marc to MarxXml converter.
Uses the Marc4J library to transform the MARC record to MarcXML.
Look for the Marcxml file and send it to the LOC BF1 converter
All files are moved to the Archive/.. folder for future reference.
The scripts that create the MARC files for conversion are located in the sul-dlss/ld4p-tracer-bullet-scripts repository. The instructions in that repository can be followed to run those scripts.
The initial LD4L project created some tools that could be useful in this project:
The Oracle JDBC maven artifacts require a license, follow the instructions at:
Once the Oracle sign-up/sign-in and licence agreement is accepted, add the sign-in credentials to maven settings. Follow maven instructions to encrypt the passwords, see
https://maven.apache.org/guides/mini/guide-encryption.html
encrypt a master password:
$ mvn --encrypt-master-password Master password: TYPE_YOUR_PASSWD_HERE {L+bX9REL8CAH/EkcFM4NPLUxjaEZ6nQ79feSk+xDxhE=}
add this master password to ~/.m2/settings-security.xml
in a block like:
encrypt server password:
$ mvn --encrypt-password Password: TYPE_YOUR_PASSWD_HERE {JhJfPXeAJm0HU9VwsWngQS5qGreK29EQ3fdm/7Q7A7c=}
add this encrypted password to ~/.m2/settings.xml
using this template:
For additional information about maven settings, see
There are convenient wrapper scripts available from the sul-dlss/ld4p-tracer-bullet-scripts project. To use those scripts, the artifacts of this project need to be downloaded or built from source. To build this project, the Apache Maven build tools must be available.
To build and package the maven project (assuming maven is installed already):
git clone https://github.com/sul-dlss/ld4p-tracer-bullets.git
cd ld4p-tracer-bullets
mvn package
The packaged JAR includes all dependencies, so it should work outside of this project. The packaged JAR can be copied to a convenient location and used on the CLASSPATH or the command line, e.g.
$ cp conversiontracerbullet/target/conversion-tracer-bullet-jar-with-dependencies.jar ~/lib/ld4p_conversion.jar
$ LD4P_JAR=~/lib/ld4p_conversion.jar
$ java -cp ${LD4P_JAR} org.stanford.MarcToXML -h
usage: org.stanford.MarcToXML
-h,--help help message
-i,--inputFile <arg> MARC input file (binary .mrc file expected;
required)
-l,--logFile <arg> Log file output (default: log/MarcToXML.log)
-o,--outputPath <arg> MARC XML output path (default:
ENV["LD4P_MARCXML"])
-r,--replace Replace existing XML files (default: false)
To run the tests and view a coverage report from the command line:
mvn clean cobertura:cobertura
ls -l target/site/cobertura/
firefox target/site/cobertura/index.html
The Travis CI builds run tests and submit a coverage report to Coveralls. To update Coveralls from the command line, try:
mvn clean test cobertura:cobertura coveralls:report -DrepoToken=yourcoverallsprojectrepositorytoken