Created
July 17, 2018 15:28
-
-
Save eckardm/5312ed4553114a7e9a3821da1467a654 to your computer and use it in GitHub Desktop.
Generated for bloggERS post entitled "Restructuring and Uploading ZIP Files to the Internet Archive with Bash."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # Move into the directory "BC-100" (the name of our quarto scanner), then move into the subdirectory named after whichever project we're scanning, then move into a staging subdirectory. | |
| cd BC-100/$1/$2 | |
| # Takes the plain text "list.txt," which is saved inside the staging subdirectory, and makes a new subdirectory for each identifier on the list. | |
| cat list.txt | xargs mkdir | |
| # For each identifier subdirectory, | |
| for d in */; do | |
| # Terminal moves into that directory and | |
| cd $d | |
| # creates three subdirectories inside named "01_JPGs_cropped," | |
| mkdir 01_JPGs_cropped | |
| # "02_JP2s," | |
| mkdir 02_JP2s | |
| # and "03_zipped_JP2_file," respectively. | |
| mkdir 03_zipped_JP2_file | |
| # It also deposits a blank text file in each identifier folder for employees to write notes in. | |
| touch Notes.txt | |
| cd .. | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment