Giter Site home page Giter Site logo

vault-contribution-count's Introduction

VAULT Contribution Count

ARCHIVED - this project is now part of the cca/equella_scripts repo

This script takes a VAULT search and then shows, for the given query, what the breakdown of contributions across collections is. Examples:

>  # last 500 published items
> node index --count=500
> # first 500 items published in 2018
> node index --count=500 --modifiedAfter=2018-01-01 --reverse
> # how many items were published in the Illustration Program collection before 2019
> node index --count=Infinity --modifiedBefore=2019-01-01 --collections=5e6a957b-80d4-4dee-9081-7186586fbbe5
> # the most recent 200 items that match the freetext query "painting"
> node index --q=painting
> # the most recent 200 items whose MODS title field is "Untitled"
> node index --where="/xml/mods/titleInfo/title LIKE 'Untitled'"

Any of the parameters you can pass to the openEQUELLA Search API route are accepted on the command line: https://vault.cca.edu/apidocs.do#!/search/searchItems_get_0

The defaults are: length 50 (no reason to change this, it is the maximum), count 200, and order by date last modified. The collections parameter is a comma-separated list of collection UUIDs. There is also a debug parameter which, when set, causes a few diagnostic messages to print to stderr.

Setup

If you have node you can simply npm install the dependencies.

You need an OAuth access token with the ability to search all collections and see items in all states (draft, live, etc). You can either pass this token on the command line as --token=${token} or (much easier) add it to a .contribution-countrc config file (see the included example). Any parameter passed on the command line may be added to the configuration file where it will be the default but can be overridden by CLI parameters.

LICENSE

ECL Version 2.0

vault-contribution-count's People

Contributors

dependabot[bot] avatar phette23 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.