mloesch / sickle

Sickle: OAI-PMH for Humans
Other
106 stars 42 forks source link

Record Model Class METS/MODS #32

Closed karkraeg closed 5 years ago

karkraeg commented 5 years ago

Has anybody worked on harvesting METS with Sickle? https://sickle.readthedocs.io/en/latest/customizing.html states that for other formats than DC we need a new record model class. I was wondering if anybody has come up with one for METS or if I start looking into this.

Thanks!

filak commented 5 years ago

Basically you need to subclass the Record class, ie.

sickle.py.txt

Dont't forget to adjust metadataPrefix for your usecase.

karkraeg commented 5 years ago

Thanks, will look into this but right now Python 3.7.4 on macOS 10.14.6 won’t import Sickle

Traceback (most recent call last):
  File "sickle.py", line 3, in <module>
    from sickle import Sickle
  File "/Users/Karl/Downloads/sickle.py", line 3, in <module>
    from sickle import Sickle
ImportError: cannot import name 'Sickle' from 'sickle' (/Users/Karl/Downloads/sickle.py)

pip3 list returns that Sickle 0.6.4 is installed 🙁

filak commented 5 years ago

Well, the code above is not a complete program - you need to adapt it to your use case.

karkraeg commented 5 years ago

Yes I know that, but right now Sickle won’t load even if I only from sickle import Sickle

mloesch commented 5 years ago

Cannot reproduce.