Skip to content

ShellyYBlack/bd-extent-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bd-extent-calculator

This script calculates the total extent in MB, files, and websites from the quantity and unittype tags in EAD3 XML finding aids. It provides the totals for the entire collection and each series, as well as all the collections.

  1. Clone the repository: git clone https://github.com/ShellyYBlack/bd-extent-calculator.git Alternatively, you can also click the green <> Code button and download a ZIP of the files.
  2. Change to the bd-extent-calculator directory.
  3. Build the image: docker build -t bd-extent-calc .
  4. To download all finding aids, run: docker run -v $PWD/EAD-XML:/EAD-XML/ -it bd-extent-calc bash -c "wget https://www.lib.ncsu.edu/findingaids/ead.txt ; cd /EAD-XML ; bash /src/download-EAD.sh" To download a single finding aid, run: docker run -v $PWD/EAD-XML:/EAD-XML/ -it bd-extent-calc bash -c "cd /EAD-XML ; wget -O mc00467.xml https://www.lib.ncsu.edu/findingaids/mc00467/ead
  5. Calculate extents by replacing path to directory and running: python3 bd-extent-calculator.py /EAD-XML > /EAD-XML/output.csv

Tips

  • If you want to run the script on a single EAD XML file instead of a directory, in step 4, replace /EAD-XML with your file path.
  • If you only need to view the results in the terminal, in step 4, you can remove the > operator and what follows it.
  • This script works on EAD3 records that use <c> elements, rather than <cxx>. It was also written for records that do not have the id or level attributes in <c> elements.

About

Calculate born-digital extents in finding aids

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published