See DLFA-221: "v1 indexer: get Solr HTTP requests for Omega files"
prettified-xml/ was created by running these commands at the root of the repo:
export TARGET_DIR=$PWD/prettified-xml
for f in $( find http-requests -type f )
do
repository=$( basename $( dirname $( dirname $f ) ) )
eadid=$( basename $( dirname $f ) )
filename=$( basename $f | sed 's/\.txt$/.xml/' )
targetDirectory=$TARGET_DIR/$repository/$eadid/
mkdir -p $targetDirectory
targetFile=$TARGET_DIR/$repository/$eadid/$filename
perl -0pe 's/^POST.*\r\n\r\n//ms' $f | xmllint --format - > $targetFile
done
Note that the first time this was done for the DLTS Omega file, had to do manual directory and filename renames, changing "Omega-EAD" to "mos_2021" in dlts/. "Omega-EAD" was used for the EAD filename, but the {{}} is "mos_2021". The initial newer appdev/ file was based on the renamed dlts/.
solr-responses/ files were created by running this command (DEPARTMENT = dlts or appdev):
curl -s -o solr-responses/[DEPARTMENT]/mos_2021.json 'http://localhost:8983/solr/findingaids/select?q=ead_ssi:mos_2021&sort=id+asc&wt=json&indent=true&rows=9999999'
...right after either the dlts/ or the appdev/ file was indexed.
Version information:
- DLTS Omega file: dlts-finding-aids-ead-go-packages/ead/testdata/omega/v0.1.5/Omega-EAD.xml
- AppDev Omega file: go-ead-indexer/pkg/ead/testutils/testdata/fixtures/ead-files /mos_2021.xml