Skip to content

Ruby script to generate a PQC spreadsheet populated with EZID arks

Notifications You must be signed in to change notification settings

upenn-libraries/pqc_arks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bulk Import CSV Generator

This is a script to pre-populate EZID ark IDs in a bulk import spreadsheet.

Requirements

  • Ruby 3.2.5 or above
  • EZID client credentials (for minting ark IDs for production)

Setup

  1. Install Ruby dependencies:
$ bundle install
  1. *** If you are minting ark IDs for production ***, source environment variables for the EZID account credentials. Add the variables to config/ezid.yml.
default_shoulder: '$SHOULDER'
user: '$USERNAME'
password: '$PASSWORD'

Where $SHOULDER, $USERNAME, and $PASSWORD are the EZID account values for production.

Usage

Usage: bulk_import_csv.rb --lines=LINES --output=FILEPATH --dryrun
    -o, --output FILEPATH            Output filepath for csv, required
    -l, --lines LINES                Number of lines, required
    -d, --dry-run                    Creates spreadsheet with arks from EZID Test API
    -h, --help                       Prints this help

To generate a spreadsheet and mint one ARK identifier per row:

ruby bulk_import_csv.rb --lines 100 --output /home/important/place/output_file.csv

A bulk import spreadsheet with 100 minted arks will be created and written to /home/important/place/output_file. csv. The arks will be minted with production credentials.

To test the script:

ruby bulk_import_csv.rb --lines 5 --output /home/important/place/output_file.csv --dry-run

A bulk import spreadsheet with 5 test arks will be created and written to /home/important/place/output_file.csv. The arks will be minted using the public test EZID credentials.

About

Ruby script to generate a PQC spreadsheet populated with EZID arks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages