PrimoCentralCounter

This utility tries to count the number of records in Primo Central. Therefor it issues search requests which should result in disjunct results (e.g. a*, b* in field sid) and retrieves TOTALHITS for each search result.

Installation

$ gem install primo_central_counter

Usage

Usage: primo_central_counter [options]

    -u, --base-url=BASE_URL                Primo base url (e.g. http://primo.kobv.de) *required*
    -i, --institution=INSTITUTION          Institution (e.g. PAD) *required*
    -c, --on-campus=ON_CAMPUS              Set the on_campus flag (default: true)
    -f, --index-field=INDEX_FIELD          Index field to use (default: sid)
        --log-level=LOG_LEVEL              Enable logging (e.g. info or debug)
    -v, --version                          Display version
    -h, --help                             Display usage informations

The output is total record cound on STDOUT. If you enable logging, this will be outputted on STDERR.

Examples

primo_central_counter -u http://primo.kobv.de -i PAD
primo_central_counter -u http://primo.kobv.de -i PAD -l info 1> ./sum.txt 2> ./messages.txt

Development

After checking out the repo, run bin/setup to install dependencies. You can run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ubpb/primo_central_counter.

License

The gem is available as open source under the terms of the MIT License.