Automatically build audio objects from template

 

Procedures

This is a description of the procedure to automatically build a batch of audio objects from template using Batch Builder 2 (BB). Use this method if you have a large number of objects (over 10) that need to be created and your source files are not broken into directories by object.

Procedure summary:
  1. Create a new project.
  2. Enter DRS deposit settings.
  3. Create object template.
  4. Add directories to template.
  5. Move/copy files into template directories.
  6. Add object name prefix to file names or supply a mapping.txt file.
  7. Create new object batch.
  8. Process the batch.
  9. Upload the batch to your dropbox
  10. Check the load report in email
What you need before you start:
  • Prepare audio files and put them in a directory of your choice somewhere on local hard disk or network drive. If you have more than one file per object (e.g.: an archival master and a deliverable or an archival master, a production master and a deliverable) make sure the file names match (e.g.: music-1.aif, music-1.wav and music-1.mp3). Consult Naming Rules section of this Guide for more information on file and directory naming.

  • Decide what you will use for Owner Supplied Names for your objects and the files they consist of. For instance, you could use local classification or local accession numbers. See Naming Rules for more information about owner supplied names.

  • Make sure you either provide object name prefix for each file to specify which objects it should be assigned to (The syntax is: [obj-osn]--[file_name].[extension]) or provide object assignment for your file in an external mapping file. For more details about providing object prefixes for your files see the File name pattern options section of Installation and Setup. For more details about external mapping files see Using mapping.txt File.
Procedure:
  1. Create a new project.

    1. Open BB by double clicking on the executable.
    2. From the Project menu select New.
    3. In the dialog enter Project Name (used for internal tracking); select the directory on disk in which the project will be saved (click the ellipsis button to browse to it on disk); select Content Model "audio" from the dropdown; click OK to continue.

  2. Enter DRS deposit settings.

    1. Click on "Deposit Settings" in Project Panel tree.
    2. Enter deposit data in the form:

      Batch Name Pattern: default -
      {owner}{batchDir}{yyyy}{mo}{dd}_{hh24}{mm}{ss}
      (This is the name for a batch that appears on DRS deposit reports. Batch name must be at least 3 characters long.)

      Success Email: type email and press enter. 
      Failure Email: type email and press enter.
      Success Method: choose how you will receive load report. 
      Deposit Agent: type your HUID.
      Deposit Agent Email: type your official Harvard email address.

  3. Create object template(called "batch template" in BB 1).

    1. Select "Object Template" in Project Panel on the left and then enter information in the Content Panel on the right.
    2. Enter Owner Code for objects you will be depositing (use all caps).
    3. Enter Billing Code for objects you will be depositing (use all caps).
    4. Select DRS Access Flag value for objects you will be depositing.
    5. Enter the URN Authority Path for your objects (Look up your Path here if needed: http://nrs.harvard.edu/urn-3:hul.ois:nrsstatusprod) – use all caps.
    6. Enter File URN Resource Name Pattern.
    7. (Optional) switch to "optional" tab to enter any optional metadata (for example descriptive metadata, roles or/and relationships that will apply to your objects). For more about optional metadata see Sections 9. Adding Relationships, 10. Adding Descriptive Metadata, 11. Adding Supporting Content.

  4. Add directories to template.

    If there is one audio file per object
    (e.g.: one file that serves as archival master and as deliverable)

    1. Right click on "Object Template" in the Project Panel on the left and add a directory (The directory name starts with "audio" but you can append a custom suffix).
    2. In the Project Panel on the left select the directory you just created.
    3. In the Content Panel on the right, choose "yes" from the dropdown list for the field "First Generation in DRS".
    4. Choose "HIGHUSE" for Usage Class.
    5. In the Content Panel switch to Optional tab, scroll down to Audio File Metadata and use Ctrl Click on your keyboard to select role ARCHIVAL_MASTER and role DELIVERABLE. Note that in order to get a delivery URN on deposit an audio file needs to have a role DELIVERABLE set in BB.

    If there are two or more audio files per object
    (e.g.: a separate file for archival master and a separate file for deliverable)

    Create a directory for an archival master and nest one or more deliverable directories inside it (this is needed for BB to determine the derivative relationship).

    1. Right click on "Object Template" in the Project Panel on the left to add a directory (this will be the directory for archival master). The directory name starts with "audio" but you can append a custom suffix.
    2. In the Project Panel on the left select the directory you just created.
    3. In the Content Panel on the right choose "yes" from the dropdown list for the field "First Generation in DRS".
    4. Choose "LOWUSE" for Usage Class.
    5. In the Content Panel switch to Optional tab, scroll down to Audio File Metadata and select role ARCHIVAL_MASTER.
    6. In the Project Panel on the left right click on the directory you just created and create another directory nested inside it (this will be the directory for deliverable audio). Once again, append a custom suffix to directory name if needed (e.g. "audio-deliverable").
    7. In the content panel choose "no" from the dropdown list for the field "First Generation in DRS".
    8. Choose "HIGHUSE" for Usage Class.
    9. In the Content Panel switch to Optional tab, scroll down to Audio File Metadata and select role DELIVERABLE. Note that in order to get a delivery URN on deposit an audio file needs to have a role DELIVERABLE set in BB.
    10. If you have more deliverables that are derived from the archival master (an mp3 deliverable and an mp4 deliverable for instance) right click on the topmost audio directory you created, add a custom suffix if needed and follow steps g-i once again.

    Go to Project menu in the top menu bar and choose Save to save your project.

  5. Move/Copy files into template directory.

    (Done outside Batch Builder)
    Once you added directories to Object Template in BB, they were also created on disk. The directory structure on disk is the same as what you see in the Project Panel in Batch Builder when you expand the Object Template icon, but on disk the Object Template directory is called "template." If you need to check where on disk Batch Builder built the directory structure, click on Deposit Settings in the Project Panel and take a look at the Project Path field at the bottom of the main metadata panel.

    • If you have one audio file per object, copy each file to the corresponding audio directory inside the template directory.
    • If you have more than one file per object, copy the files for each object into corresponding nested audio directories in the template directory.

      Important: the file names for all files belonging to the same object need to match (e.g.: audio-1.aif; audio-1.wav; audio-1.mp3).

6.  Add object name prefix to file names or supply a mapping.txt file.

In order to tell BB which object each file should end up with you need to either add object name prefixes to each file name or supply a mapping.txt file that associates each file with its future object.

    • Add an object owner supplied name as a prefix to the name of each file. The prefix needs to be separated from the file name by the special separator sting "-". E.g.: obj1-file1.aif is a file name that tells Batch Builder that this particular file needs to be part of object obj1. Make sure that the file name pattern setting in the BB Options dialog is set to the correct setting. See more information about file Owner Supplied Name pattern settings in Setting Options in Installation and Setup.
    • Provide a mapping file mapping.txt placed in the project /_aux/template directory which maps each file to an object owner supplied name.

      Syntax: relative_file_path,file_OwnerSuppliedName,PDS_sequence number(optional),object_OwnerSuppliedName

      Notes on syntax: There should be no spaces between a comma "," and the next character. If an optional element value is skipped it still needs to be designated by a comma "," so Batch Builder can associate the right value with the right element. For example, for objects that do not have PDS sequence numbers, an extra comma needs to be inserted between the FILE OSN value and Object OS. 

      Example:



7.  Create a new object batch.

You can create your new object batch in the Graphical User Interface or using the Command Line Interface (CLI).

In the Graphical User Interface

    1. From the Object menu in BB select "Create a new batch with objects from template"; enter the name of the batch directory to be created on disk and click OK. A new batch icon will be added to the Project Panel on the right (icon with a red letter B) and new objects will be built that are going to be part of this batch.
    2. In the Project Panel click on the "+" next to the Batch icon of the batch you just created to expand the tree – it will show the icons for the new objects (a blue letter O).
    3. (Optional) Select each object icon in the Project Panel and edit any needed metadata (for instance, if each object has a separate corresponding HOLLIS record, you can switch to the Optional tab in the Content Panel on the right while the object icon is selected in the Project Panel on the left and enter the Aleph or Alma ID for each object in the "Aleph/Alma ID for MODS import" field).

In the Command Line Interface

    1. In the command line window (Terminal on Mac or Linux or CMD on Windows) change to the BB installation directory, e.g.: cd C:\Program Files\BatchBuilder\BatchBuilder-2.0.45
      Type bathcbuildercli –a buildtemplate –p [project_directory_path] –b [batch_directory_name], e.g.: batchbuildercli -a buildtemplate -p "E:\My Project" -b batch1

      Note that the batch directory name is the name of your new batch directory, to be created by BB.

    2. If the batch creation is successful you will see the following messages:

      Initializing BB...
      Done!
      Creating batch1 and objects from files in the template...
      Success!

8.  Process the batch.

You can process your batch in the Graphical User Interface (GUI) or using the Command Line Interface (CLI)

In the Graphical User Interface

    1. In the Project Panel on the left right-click on the batch you want to process (batch icon with a red letter B) and select "Create descriptors and batch.xml."
    2. Builder will start processing the batch.
    3. When the batch is successfully processed you will see the following message: FINISHED - Creation of batch.xml and descriptors complete for batch: 
    4. If you see any error messages, remedy the errors and re-process the batch.

In the Command Line Interface

    1. In the command line window (Terminal on Mac or Linux or CMD on Windows) change to the BB installation directory, e.g.: cd C:\Program Files\BatchBuilder\BatchBuilder-2.0.45
    2. Type batchbuildercli –a build –p [project_directory_path] –b [batch_directory_name], e.g.: batchbuildercli -a build -p "E:\My Project" -b batch1
    3. (Optional) add additional parameters to the bathcbuildercli command to substitute batch, object and directory level properties. For more information see Creating Batches Using Command Line Interface.

    4. When the batch is successfully processed you will see the following messages:

      Building PREMIS file metadata...
      Building HulDrsAdmin file metadata...
      Success!

If you see any error messages at the end of batch processing, remedy the errors and re-process the batch (you can disregard any errors showing during batch processing on command line as long as you get the final "Success!" message)

On this page: