GithubHelp home page GithubHelp logo

arks_processing's Introduction

arks_processing

This repo contains code to retrieve and mint ARKs. For both scripts you will need to put your authorization token in auth_token

You can find the auth token here https://libapps.colorado.edu/api/user/

Note: You can only mint for collections that have a 1:1 relationship between record and item in luna. It will not work if one record is linked to multiple items.

Do not mint for Charles F. Snow, Colorado Historical Maps, or Publishers Bindings.

getARKs.py

This script pulls down all ARKs that are currently in the server, and outputs them in a csv arks_[current date].csv

python getARKs.py

mintARKs.py

This script mints ARKs based on URLs for items in the CUDL.

  1. Export metadata from CUDL
  2. Make sure 'Identifier ARK#1' is a column in the csv
  3. On the CLI run python mintARKs.py inputfile.csv outputfile.csv. Output file can be whatever you would like to call it
  4. Run the script on test
  5. Make sure that no ARKs were overwritten between the input and output file
  6. Run on prod
  7. Check that ARKs in prod spreadsheet resolve correctly
  8. Reupload csv to CUDL

deleteARKs.py

This script takes a csv of ARKs and deletes them.

  1. Export metadata from CUDL
  2. Make sure 'Identifier ARK#1' is a column in the csv
  3. On the CLI run python deleteARKs.py inputfile.csv
  4. Check that ARKs in spreadsheet no longer resolve
  5. Remove AKRs from spreadsheet and reupload csv to CUDL

testARKs.py

This script takes a list of ARKs and tests them for HTTP errors. Prints results to terminal.

  1. Run python getARKs.py
  2. Run python testARKs.py [output file from step 1]

updateARKs.py

Takes new URLs and replaces the old resolve URLs on the server so that the ARK can resolve to the new one. Requires a csv with the arks and the new URLs. The csv must have two columns: Identifier ARK#1 which contains the ark that needs to be updated, and lnexp_PAGEURL which contains the new URL that the ARK will resolve to. This one can only be run on production

  1. Run python updateARKs.py [csv file]

arks_processing's People

Contributors

cuboulder-msd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.