diff --git a/README.md b/README.md index c4620b8dc5a22eea41a26c81742f3bb1cc062776..e8dbb0e8a62772535cb326129caefc25e4a4f15b 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,8 @@ queried. ## [OAI-PMH](OAI-PMH.ipynb) We show how to use [Sickle](https://sickle.readthedocs.io/en/latest/) to first list all available sets and then count -the number of entries in one specific set. \ No newline at end of file +the number of entries in one specific set. + +## [Harvest ABO Marc](harvest_abo_marc.py) + +Small script to harvest ABO metadata in Marc format via OAI-PMH. \ No newline at end of file diff --git a/harvest_abo_marc.py b/harvest_abo_marc.py new file mode 100644 index 0000000000000000000000000000000000000000..cc3b7960a4764fb6177c83008ff51d26b951d84f --- /dev/null +++ b/harvest_abo_marc.py @@ -0,0 +1,10 @@ +from sickle import Sickle + +sickle = Sickle('https://eu02.alma.exlibrisgroup.com/view/oai/43ACC_ONB/request') +records = sickle.ListRecords(metadataPrefix='marc21', set='ABOMARC') +counter = 0 +for record in records: + counter = counter + 1 + print(counter) + with open('marc/' + str(counter) + '.xml', 'w') as fp: + fp.write(record.raw) \ No newline at end of file