Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Access Catalogue Data
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 itself does not have special requirements.
### 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
If you want to access ÖNB catalogue data, you can use the following
import statement to get started:
`from catalogue import onbsru`
And then instantiate the OnbRecordRetriever class:
`myinstance = onbsru.OnbRecordRetriever()`
For now this will allow you to retrieve one specific record via one of
the following unique IDs:
* barcode - Barcode
* ac\_num - ID within the Austrian Library Network
* mms\_id - Ex Libris Alma's internal ID
For example:
`myinstance.by_ac_num("AC12345678")`
## 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
* **Stefan Karner** - Senior Developer
* **Gabriele Höfler** - Junior Developer
# License
This project is licensed under the MIT License - see the LICENSE file
for details.