mjordan / claw_rest_ingester Goto Github PK
View Code? Open in Web Editor NEWScript to ingest a batch of nodes and accompanying media using Islandora CLAW's REST interface
License: The Unlicense
Script to ingest a batch of nodes and accompanying media using Islandora CLAW's REST interface
License: The Unlicense
Thanks to @dannylamb's patience on IRC, I got this working:
curl -v -u admin:islandora -H "Content-Type: application/json" -X PATCH --data-binary @my.json "http://localhost:8000/media/17?_format=json"
where my.json is
{"bundle": [{"target_id":"web_content","target_type":"media_bundle"}], "field_premis_event": [{"value":"Hi there."}]}
The ingester should be able to add fields other than title and description. It should auto-detect additional fields in the CSV and if the corresponding field exists in the target content type, populate it.
They result in a 500. I think the routes are incorrect.
field_member_of
with the node ID of the collection is what we want to populate.
So it can be wrapped in Electron for a nice desktop app!
E.g., delimiter (tab), field wrapper (single quote), etc.
If we can get a list of the specified content type's fields via REST, we can do a pre-ingest validation on whether or not the fields in the CSV exist, and if not, skip them.
Currently, only Text fields can be populated.
This doesn't need to be a command-line application. Electron for example would be a good desktop development framework to develop this in. A list of apps developed in Electron is available at https://electronjs.org/apps.
Related, it might be useful to test some REST requests to Islandora using https://electronjs.org/apps/advanced-rest-client.
This file would then be called as a command-line parameter.
Alt text is a required field in the GUI for image media, so we will need to PATCH
a value for this field upon successful PUT
ing the media.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.