Skip to content
README.md 1.73 KiB
Newer Older
# Access ÖNB's Catalogue Data
gabriele-h's avatar
gabriele-h committed

For general information on what is covered in this project, please
visit <https://labs.onb.ac.at/en/dataset/catalogue/>. For now the
following things are covered:

* sru - Get catalogue data via SRU as etree-Elements
* marc\_tools - Extract specific information from the catalogue data

## Getting Started

The module does not require third party or local imports.
gabriele-h's avatar
gabriele-h committed

### Prerequisites

You should use a recent Python version, 3.6 and up. If you want to
make use of the included tests for the marc\_tools, you will need
to install the module `pytest`.

### Usage

#### sru
gabriele-h's avatar
gabriele-h committed

Retrieve bibliographic records from Alma via SRU for any query or
by the following unique IDs:
gabriele-h's avatar
gabriele-h committed

* barcode - Barcode
* by\_marc\_009 - other system number, e. g. AC-number (OBV-specific UID)
* mms\_id - Ex Libris Alma's internal ID
gabriele-h's avatar
gabriele-h committed

There is a separate README for the [subpackage sru](sru/README.md) available.
gabriele-h's avatar
gabriele-h committed

#### marc\_tools
gabriele-h's avatar
gabriele-h committed

Extract bibliographic data from MARC-XML.
gabriele-h's avatar
gabriele-h committed

There is a separate README for the [subpackage marc\_tools](marc_tools/README.md)
available.
gabriele-h's avatar
gabriele-h committed

For an example of how *marc\_tools/marc\_extractor* can be used,
have a look at the Jupyter Notebook in [extract-bibliographic](//labs.onb.ac.at/gitlab/labs-team/extract-bibliographic).
gabriele-h's avatar
gabriele-h committed

## Running the tests

Right now there is only one test file for the extraction of
MARC-categories. The tests are implemented using pytest.

### Testing the patterns for marc\_extractor

These tests will check if marc\_extractor.py is accepting the right
kinds of patterns and rejecting the wrong ones.

`pytest marc_tools/tests/test_marc_extractor.py`

# Built With

* Python3

# Authors

* Gabriele Höfler
* Stefan Karner
gabriele-h's avatar
gabriele-h committed

# License

This project is licensed under the MIT License - see the LICENSE file
for details.