Skip to content

BAroQUe: Bentley Audiovisual Quality control Utility

License

Notifications You must be signed in to change notification settings

eckardm/baroque

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BAroQUe

BAroQUe: Bentley Audiovisual Quality control Utility

The Bentley Audiovisual Quality control Utility (BAroQUe) is a Python 3-based Command Line Interface (CLI) executable primarily intended for in-house use. It performs Quality Control (QC)--with microservices to validate directory and file naming structure, METS XML and WAV BEXT chunks--for audio digitized by vendors according to Bentley specifications.

This README includes general installation and usage documentation for BAroQUe. For technical documentation intended to assist developers, check the project's development documentation.

Contributors

Requirements

  • Requires Python 3.0 or higher.
  • cx_Freeze: To build an executable file
  • dateparser: To compare dates in metadata exports and METS XML
  • lxml: To parse METS XML files
  • openpyxl: To read xlsx files
  • tqdm: To make loops show a smart progress meter

Installation

  • Clone this repository to your computer
  • cd baroque
  • pip install -r requirements.txt

Usage

usage: baroque.py [-h] [-d DESTINATION] [-s] [-m] [-w] [--all] SOURCE_DIR EXPORT_FILE

Positional Arguments:

Argument Description
SOURCE_DIR Path to source directory
EXPORT_FILE Path to metadata export file

Actions:

Argument Description
-s, --structure Validate directory and file structure
For more information, see Structure Validation documentation.
-m, --mets Validate METS
For more information, see METS Validation documentation.
-w, --wav Validate WAV BEXT chunks
For more information, see BEXT Validation documentation.
--all Run all validations

Optional Arguments:

Argument Description
-h, --help show the help message and exit
-d DESTINATION, --destination DESTINATION Path to destination for reports

BAroQUe's functionality is implemented in baroque.py, which is a command line script that takes as its input a minimum of 3 arguments:

SOURCE_DIR
The path to a source_directory that corresponds to either a shipment, a collection, or an item directory

EXPORT_FILE
The path to a metadata export (CSV or XLSX) corresponding to the shipment to validate against. BAroQUe expects this metadata export to contain at least the following column headers: "DigFile Calc", CollectionTitle", "ItemTitle", and "ItemDate".

[-d, --destination]
An optional argument (-d, --destination) with a path to a destination directory where reports and logs will be stored. In the absence of this argument, BAroQUe checks a .baroque configuration file in the current user's home directory. Failing that, BAroQUe defaults to a reports directory in the BAroQUe installation's base directory.

Actions
The optional validation action(s) to be run against the source directory (otherwise BAroQUe will just characterize the source directory as a shipment, collection or item)

Command Examples

Validate directory and file structure

$ baroque.py SOURCE_DIR EXPORT_FILE -s/--structure

or, with the optional destination argument...

$ baroque.py SOURCE_DIR EXPORT_FILE -d/--destination /path/to/reports -s/--structure

Validate METS XML

$ baroque.py SOURCE_DIR EXPORT_FILE -m/--mets

or, with the optional destination argument...

$ baroque.py SOURCE_DIR EXPORT_FILE -d/--destination /path/to/reports -m/--mets

Validate WAV BEXT chunks

$ baroque.py SOURCE_DIR EXPORT_FILE -w/--wav

or, with the optional destination argument...

$ baroque.py SOURCE_DIR EXPORT_FILE -d/--destination /path/to/reports -w/--wav

Validate directory and file structure, METS XML and WAV BEXT chunks

This steps runs all validation checks described above.

$ baroque.py SOURCE_DIR EXPORT_FILE --all

or, with the optional destination argument...

$ baroque.py SOURCE_DIR EXPORT_FILE -d/--destination /path/to/reports --all

About

BAroQUe: Bentley Audiovisual Quality control Utility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%