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
from bhlaspaceapiclient import ASpaceClient | |
from dappr import DAPPr | |
import sys | |
print("initializing ASpaceAPIClient and DAPPr") | |
archivesspace = ASpaceClient(instance_name="PROD") | |
resource_id = 9345 | |
collection_id = '' |
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
from dappr import DAPPr | |
handles = [ | |
'2027.42/151244', | |
'2027.42/151243', | |
'2027.42/151242', | |
... | |
] | |
deepblue = DAPPr(instance_name="PROD") |
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
import csv | |
from dappr.dappr import DAPPr | |
from dappr.config import prod | |
from datetime import datetime | |
import os | |
import requests | |
accession_id = 170864 # 168861 | |
csv_metadata = [] |
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
import configparser | |
import os | |
import subprocess | |
import shutil | |
config = configparser.ConfigParser() | |
config.read('config.ini') | |
accession_id = 170864 |
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 |
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
r_drive_barcodes_from_jackie = [ | |
"39015071744309", | |
"39015071744317", | |
"39015071744325", | |
... | |
] | |
r_drive_barcodes_from_rmw = [ | |
"39015071744788", | |
"39015071744804", |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
def main(dirname): | |
try: | |
print('"171317"') | |
except Exception: | |
print('None') |
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
def _archive_zip(self, src, dst): | |
"""Return the command that creates the ZIP archive file.""" | |
if not dst.endswith('.zip'): | |
dst += '.zip' | |
return (dst, [ | |
'7z', 'a', # Add | |
'-bd', # Disable percentage indicator | |
'-tzip', # Type of archive | |
'-y', # Assume Yes on all queries |
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
import requests | |
from tqdm import * | |
import json | |
from auth import archivesspace_url, archivesspace_username, archivesspace_password | |
def get_eligible_digital_objects(): | |
url = archivesspace_url + "/users/" + archivesspace_username + "/login?password=" + archivesspace_password | |
response = requests.post(url) | |
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
def _set_permissions(self, package): | |
try: | |
handle = package.misc_attributes['handle'] | |
except KeyError: | |
LOGGER.warning('Cannot update permissions - package handle unknown') | |
return | |
# Only set if policy exists | |
if not self.metadata_policy: | |
LOGGER.info('Restricted metadata policy is empty (%s), not setting', self.metadata_policy) |
NewerOlder