aim.cli.digifeeds module

Digifeeds CLI

aim.cli.digifeeds.add_to_digifeeds_set(barcode: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f88917027b0>])[source]

Add a barcode to the Digifeeds Database and then to the Alma Digifeeds Set

If the barcode is in the database fetch it and then try to add it to the Digifeeds set in Alma. Prints an error message if the barcode isn’t found in Alma. Prints the status of adding the item to the digifeeds set.

Parameters:

barcode (str) – Barcode of item

aim.cli.digifeeds.check_and_update_hathifiles_timestamp(barcodes: ~typing.Annotated[~typing.List[str], <typer.models.ArgumentInfo object at 0x7f8891624f50>])[source]
aim.cli.digifeeds.check_zephir(barcode: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f8891625090>])[source]

Check if barcode has metadata in Zephir

aim.cli.digifeeds.generate_barcodes_in_hathifiles_report()[source]

Generates a report of barcodes that have been found in the Hathifiles Database in the last two weeks. The dates in the report are the rights-timestamp in the Hathifiles.

aim.cli.digifeeds.generate_barcodes_in_s3_report()[source]

Generates a report of barcodes that have been moved to the google pickup location in the last two weeks. It is based on the files in the processed location in the s3 bucket. This report is sent to a folder on Mayhem.

aim.cli.digifeeds.list_barcodes_in_input_bucket()[source]

List the barcodes currently in the input directory in the S3 bucket.

aim.cli.digifeeds.list_barcodes_potentially_in_hathifiles()[source]

List the barcodes of items that have gone through the digifeeds process and could be in hathitrust. These are items with status pending_deletion and without status in_hathifiles.

aim.cli.digifeeds.load_statuses()[source]

Load the statuses into the database.

aim.cli.digifeeds.move_to_pickup(barcode: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f8891624b90>])[source]

Moves the zipped volume from the s3 bucket to the pickup location for google. When it’s finished, the volume is moved to the processed folder in the bucket and prefixed with the date and time.

aim.cli.digifeeds.process_barcode(barcode: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f8891625310>])[source]

Runs through the whole process for a barcode: adding it to the digifeeds set, checking zephir, and moving the item to the pickup google drive.

aim.cli.digifeeds.process_barcodes(barcodes: ~typing.Annotated[~typing.List[str], <typer.models.ArgumentInfo object at 0x7f8891625450>])[source]

Runs through the whole process for each of the given barcodes: adding it to the digifeeds set, checking zephir, and moving the item to the pickup google drive.

aim.cli.digifeeds.prune(location: ~typing.Annotated[~typing.Literal['s3', 'fileserver'], <typer.models.ArgumentInfo object at 0x7f8891625590>])[source]

Deletes zips and folders of images in paths of images that have been newly sent through digifeeds and have now been found in the hathifiles. The fileserver is Mayhem.