Created
February 13, 2024 14:37
-
-
Save epoz/b6b9dba9f9d859e1fa136ff3f3ead0b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nfdi4culture import cto | |
from lidolator import from_file | |
item = cto.Item() | |
item.datafeed = "https://nfdi4culture.de/id/E5320" | |
# Or should we have cto.DataFeed("https://nfdi4culture.de/id/E5320") and the rest happens from there? | |
# either of the above will set things like .publisher on the Item too. | |
# and create the relevant schema.DataFeedItem and schema.DataFeed triples? | |
item.sourcefile = "http://foo.com/bar/baz.oai-pmh?id=123456" | |
# the update method expects a dict with key-value mappings | |
# the cto.Item objet knows how to map a key and value to the relevant fields. | |
# How do we specify this field mapping? | |
# And do we split it into a NamedNode/Literal difference? | |
item.update(from_file(filepath)) | |
item.ntriples() | |
# or | |
item.turtle() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Started on something at: https://github.com/epoz/nfdi4culture_python_package