Skip to content

databrary/databrary_utils

Repository files navigation

Databrary utils scripts

Requirements

  1. NodeJS and Git Installed on your machine.
  2. Clone this repo
  3. Install required dependencies; execute the following:
    cd CLONED/REPO/PATH
    node install
    
  4. Execute the following command in the project root directory (Optional)
    yarn init
    cp config/default.yaml config/local.yaml
    
    Edit local.yaml to include your Databrary username and password
  5. Create opfs and logs folders in your root directory
  6. IMPORTANT: You will need to have access to any volume that you will call from these scripts

Scripts

This Repo contains the following utility scripts:

uploadOpfs.js

This script will upload opf files found in opfs folder to a Databrary volume, it will match - the asset name contains the opf file name - the appropriate opf according to the asset(video) name found in a session

Usage

node uploadOpfs.js -v VOLUME_ID -u USERNAME -p PASSWORD

if you edited local.yml file with your credentials, you can use the following:

node uploadOpfs.js -v VOLUME_ID

Notes

  • The script can upload only one opf file per session.
  • Only the first asset will be used to fetch the appropriate OPF file.
  • The script will launch a browser and connect to your Databrary account.
  • An internet connexion is required.
  • You will find the logs generated by the script in logs/all.log, the log file will be erased after each run.

Releases

No releases published

Packages

No packages published