SFULibrary / islandora_rest_ingester

Command-line tool for ingesting objects via the Islandora REST interface
The Unlicense
3 stars 0 forks source link

Add ability to use PIDs of existing objects #7

Closed mjordan closed 6 years ago

mjordan commented 6 years ago

Providing a full pid in the -n option will ingest an object with that PID; if an object with that PID already exists, the operation is skipped and logged. Problem/bug is, we can only provide a single PID in -n, and there could be many object input directories. So we need a way to get PIDs for every object in the input directory.

Work in #5 will let us get a PID from the FOXML, if it is present in the input directory (currently under development). Perhaps we can provide an option indicating that the object input directory encodes the pid. Of course, there are some characters that may exist in PIDs that you don't want in directory names, e.g., : on Windows), so they should be URL-encoded.

mjordan commented 6 years ago

As part of work on #9, I have changed this so that you need to omit --namespace in order for the ingester to reuse PIDs from object-level directories. But, you can now ingest multiple objects this way, in other words, if you omit the namespace option, all objects in the input directory will be restored (provided their PIDs are valid).

mjordan commented 6 years ago

Rolled into #9.