MSSA Copy Order Fulfillment
Scripts to support an MSSA workflow for fulfilling copy orders for already-digitized materials.
What’s included
preservica_file_picker.py: a lightweight Python console application to download files from Preservica.package_files.py: Packages folders into a .zip archive fileget_spreadsheet_data.py: Gets patron reprographics data from Google Sheets APIcreate_shared_links.py: uploads .zip files to Yale Box, creates a shared public link which expires after 10 days, returns a report containing patron name, Aeon username, order number, and box link.update_spreadsheet_data.py: Updates patron reprographics data via Google Sheets APIgenerate_email_template.py: Generates boilerplate email text to send to patron using report fromcreate_shared_links.pyclean_directories.py: Moves or deletes files and folders after files are sentconstants.py: utility file to hold console app styling dataconfig/config.json: user config settingsconfig/service_account.json: Placeholder for Google API config file
Proposed workflow
Public Services staff receive a request from a researcher for digitized materials
Public Services staff ensures customer is registered in Aeon and signs the user agreement
Public Services staff fill out tracking spreadsheet and create Quickbooks order
Public Services staff run the ‘Preservica Access Copy Links’ report in the ArchivesSpace staff interface to retrieve all Preservica digital content links for one or more collections
Public services staff review the report and mark, in the first row, any files that should be downloaded and sent to the patron
Public services staff save the CSV file as a new file into a “hot folder” on a network drive; the file should be named with the patron’s last name and order number separated by hyphens (i.e. customerlastname-ordernumber.csv)
At the end of each day a script runs from an MSSA/YAMS server which zips and shares the files via an expiring Yale Box link. The script returns a report, stored in the same folder, containing the request date, patron name, Aeon username, order number, and institutional affiliation for each request
Digitization staff send emails to patrons from Aeon containing Box links