Output from `iduF --help` captured on 5-March-2021
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
[islandora@dgdocker1 ~]$ docker exec -it isle-apache-dg bash | |
root@7b1ab68705d0:/# cd /var/www/html/sites/default/ | |
root@7b1ab68705d0:/var/www/html/sites/default# drush -u 1 iduF --help | |
Attempts to apply the specified 'Fix' to one or more existing PIDs. | |
Examples: | |
Example drush iduF grinnell:10000 ChangeText --dsid=MODS --xpath="/mods/relatedItem/identifier[@type='uri']" | |
Arguments: | |
first First PID to process. The namespace (ns) portion of this PID defines the default primary namespace. This parameter may be | |
specified as a .csv file path (like public://objects.csv), or 'ns:first-last' in place of the --repeat option, or 'ns:*' to | |
operate on all collection objects. A special entry in the form of ns:last can be used to specify starting at the highest | |
ns:PID number which has been indexed in Solr. | |
fix Completes the name of the drush_idu_fix_NAME function to be called for each processed object. Available Fix functions are: | |
--- The first 3 commands may be automatically executed | |
during ingest of a new object --- | |
CompoundTN - | |
Creates a CompoundTN datastream for a compound parent object. | |
The new image datastream is constructed from up to four | |
child object thumbnails. | |
SelfTransform - | |
Applies the specified --self self-transform to the specified | |
--dsid datastream. Use --reorder to also reorder MODS. | |
[Verified 27-Apr-2018] | |
UpdateDC - | |
Ensures that specified objects have NO empty or missing | |
dc:date or dc:creator fields. This function also populates a | |
/mods/extension/creators field from which dg_creators_s is | |
derived. Default values for date and creator are | |
'Unspecified' and 'Unknown'. Use --fixName to ensure that | |
MODS records have a valid /name/namePart[not(@*)] element. | |
Options: | |
--hidden=FALSE If TRUE a /mods/extension/hidden_creators element is | |
created instead of /mods/extension/creators. | |
--- The commands which follow are never automatically executed --- | |
AddDatastream - | |
Adds the --dsid datastream with --title and --contents to an | |
existing object. | |
Option defaults are: | |
dsid=WF, | |
title='Islandora Webforms List', | |
contents=' 1934660 ' | |
AddXML - | |
Adds a single XML element named --title, with a value of | |
--contents, to an existing object's --dsid datastream. One | |
element is appended to one existing parent element identified | |
by --xpath. | |
Option defaults are: | |
dryRun=FALSE, | |
dsid=MODS, | |
xpath=/mods:mods/mods:originInfo, | |
title=dateCreated, and | |
contents=date('now') | |
ChangeDatastream - | |
Changes the --dsid datastream's LABEL to --title, OR its ID to | |
--replace for an existing object. | |
ChangeText - | |
Changes --find text to --replace either in general or within the | |
value of a specified --xpath. | |
Options: find, replace, substitutionsFile, dsid, xpath, dryRun. | |
ChildSync - | |
Synchornize characteristics of child objects with their parent. | |
This function only touches objects where the isConstituentOf | |
relationship exists. | |
Characteristics include: | |
Child will inherit the same isMemberOfCollection values as | |
the parent. | |
Clean - | |
Removes all unnecessary datastreams from an existing object. | |
CModelToMODS - | |
Copy object's /rdf:RDF/rdf:Description/... | |
fedora-model:hasModel[@rdf:resource] attribute from the RELS-EXT | |
datastream to its /mods/extension/CModel. | |
ConvertTIFtoJP2 - | |
Converts an object OBJ datastream to a JP2 using options | |
specified by --convert or --compress. | |
CopyDatastream - | |
Copies the named --dsid datastream from a specified --parent object | |
to the target object. [Verified 2-May-2018] | |
CorrectCollections - | |
Corrects collection assignments including removal of duplicate | |
collection relationships, and removal of --retire collection | |
references IF other relationships exist. | |
CreateIslandoraBags - | |
Initiates one or more 'drush --user=1 create-islandora-bag object PID' | |
commands to generate Bagit containers of object datastreams. | |
DateCreatedFix - | |
Looks for invalid date strings in /mods/originInfo/dateCreated | |
fields and attempts to fix them if the --dryRun option | |
is NOT set. Note that --force defaults to TRUE for this command. | |
DateFieldFix - | |
Looks for invalid date strings in /mods/originInfo/date* | |
fields and if found, it removes the field and replaces it with | |
a corresponding /mods/note[@type='date'] field, value and, an | |
appropriate @displayLabel attribute too. Modified object MODS | |
are automatically reordered, self-transformed, and re-indexed | |
in Solr. [Verified 23-Aug-2018] | |
DCTransform - | |
Applies the specified MODS-to-DC Transform to an object. | |
Derivatives - | |
Attempts to regenerate ALL derivatives for an existing object. | |
Discover - | |
Attempts to identify objects that are NOT indexed in Solr. The | |
--force and --repeat options are implied with a default --repeat | |
value of 1000. | |
HarvestOCR - | |
Looks for OCR or FULL_TEXT datastreams in the target objects and, | |
if found, it writes the datastream text content to a file named | |
[namespace]_[pidn].[ds].txt in | |
//STORAGE/LIBRARY/LIBSTU/DG_OCR_Files/Pending_Review/. | |
ImportCSV - | |
Reads data, one line at at time, from the named --csv CSV data file | |
and passes the line to idu_drush_import( ) for processing. | |
IndexSolr - | |
Attempts to update an object's Solr index. If the --force option is | |
set this command will NOT use Solr to retrieve a list of objects. | |
isConstituentOf - | |
Changes a literal isConstituentOf value to a proper | |
attribute form. | |
Last - | |
Find the last (largest PID) indexed in Solr for the specified | |
namespace and sets the namespace_last variable with it's value. | |
List - | |
Prints a list of objects matching the PID spec with --repeat, | |
--collection, and --contentType options | |
accounted for. [Verified 15-Feb-2021] | |
MakeFamily - | |
Converts the specified object to a compound parent and makes the | |
original content a new child of that parent. | |
MakeSibling - | |
Attempts to make the specified object a sibling of an existing | |
--sibling PID. | |
MigrateObject - | |
Migrates an object from its --source (or --source=None) collection | |
to --replace. [Verified 31-Aug-2018] | |
MIMEFix - | |
Changes errant object MIME types from --find to --replace. | |
PermissionsRelax - | |
Applies a 'relaxed' POLICY to an object to make it visible | |
to all. The original POLICY is copied to a new Old_POLICY | |
datastream. If --find is specified the change will be made | |
ONLY if the specified string exists in the DC datastream, and | |
if both --find and --dsid exist then only the specified DSID | |
will be searched. | |
Option defaults are: | |
dsid=NULL | |
find=NULL | |
PermissionsRestore - | |
Restores an 'Old_POLICY' datastream as POLICY in order to bring | |
back an object's original permissions/policy. | |
Purge - | |
Deletes the object. If the --force option is set this command | |
will NOT use Solr to retrieve a list of objects. | |
Be careful with this one! [Verified 30-Apr-2018] | |
PurgeDatastream - | |
Deletes the --dsid datastream. Be careful with this one too! | |
[Verified 2-May-2018] | |
PurgeDSVersions - | |
Purges all but the current copy of an existing object's --dsid | |
datastream. | |
PurgeElements - | |
Removes all --xpath matched elements from the specified --dsid | |
datastream. [Verified 27-Apr-2018] | |
PurgeFamily - | |
Delete an object and all of its constituents! | |
PurgeInactive - | |
Deletes the specified objects if they are in an Inactive or Deleted | |
state. | |
RemoveDatastreams - | |
Removes the named --dsid datastream(s) from an existing object. Note | |
that in this context --dsid may contain wildcards like the default | |
value of MODS_*. Use --dryRun to count matches only. | |
RemoveDuplicateElements - | |
Removes duplicate elements from the --dsid datastream of an existing | |
object. Use the --dryRun option to report duplicates only. | |
RemoveEmptyCues - | |
Removes empty cue elements from the --dsid (default is TRANSCRIPT) datastream | |
of an existing oral history object. Use the --dryRun option to | |
report only. | |
RenameDatastream - | |
Changes the DSID of the named --dsid datastream to one named | |
--replace, and if --self is specified, runs the self transform on | |
the datastream. | |
ReportChildDuplicates - | |
Echo the MODS elements of a child object that are duplicated in its | |
parent. | |
Special - | |
Based on ChangeText...this command changes to meet special needs! | |
Options: dsid, xpath, dryRun. | |
Thumbnail - | |
Applies the specified thumbnail image to an object. | |
TitleBookPage - | |
Changes the label/title of a book page to | |
'Parent Title - Page XXX'. | |
toIR - | |
Migrates an object from any collection to the grinnell:generic | |
collection. | |
toPHPP - | |
Migrates an object from the grinnell:generic collection | |
to grinnell:phpp. | |
Options: | |
--cmodel Specifies the target CModel (content model) in the ChangeCompound command. Defaults to 'islandora/sp_large_image_cmodel'. | |
--collection Specifies the target collection (should use a wildcard and no colon, like '*test' in lieu of ':test') from which objects | |
will be selected for processing. | |
--compress Specifies a file containing Kakadu 'compress' options for the ConvertTIFtoJP2 fix. | |
--contentType Specifies the content model (type...should include wildcards like '*image*') of object(s) to be selected for processing. | |
--contents Specifies text to be included in a datastream or XML element. Default varies by use. | |
--convert Specifies a file containing ImageMagick 'convert' options for the ConvertTIFtoJP2 fix. | |
--createdDate If set with any portion of a YYYY-mm-ddTHH:ii timestamp string, only objects with a creation date/time matching createdDate* | |
are considered. 2018-12, for example, applies to all objects created in December 2018. Default is '2' for all objects. | |
--creator Specifies a dc:creator value for the UpdateDC fix. Default is 'Unknown'. | |
--csv Specifies the path of a CSV file to be read. Defaults to public://data.csv. | |
--date Specifies a dc:date value for the UpdateDC fix. Default is 'Unspecified'. | |
--dryRun If set, this option instructs the operation to identify and count changes, but not commit then. | |
--dsid Specifies the datastream ID, or special 'LABEL', in which to make changes. | |
--find Specifies text to be found (and in some cases replaced). | |
--fixName If set, this option instructs UpdateDC to ensure that a MODS /name/namePart[not(@*)] element exists. | |
--force If set, this option instructs IndexSolr and other commands NOT to use Solr to fetch a list of objects. | |
--hidden If set for UpdateDC, this option creates /mods/extension/hidden_creators instead /mods/extension/creators. | |
--ignoreOBJ If TRUE, this option tells 'ChangeCompound' that no OBJ is required when changing a compoundCModel to another type. | |
--image Specifies the path to a jpeg image to be applied by the specified Fix operation. Defaults to | |
public://ImageNotAvailableTIFF_TN.jpg. | |
--mime Specifies the OBJ MIME type of objects to process. Defaults to 'image/tiff'. | |
--modDate If set with any portion of a YYYY-mm-ddTHH:ii timestamp string, only objects with a modified date/time matching modDate* are | |
considered. 2018-12-0, for example, applies to all objects modified on December 1st thru 9th, 2018. Default is '2' for all | |
objects. | |
--only Specifies the ONLY DSID to be regenerated, --only=TECHMD is one example. Defaults to * for all derivatives. | |
--parent Specifies the PID of an existing parent object in need of a child. | |
--reindex When used in combination with --force this option forces a pre-emptive re-indexing of objects. | |
--reorder If set, this option instructs SelfTransform to run public://reorder_mods.xsl after the initial self-transform. | |
--repeat Specifies the number of consecutive PIDs following 'first' to be processed. Default is 'all'. | |
--replace Specifies the text that 'find' will be replaced with. | |
--retire Specifies one collection that target objects are to be removed from when using the CorrectCollections command. | |
--self Specifies the path to the self-transform XSL file to be applied. Defaults to public://cleanup_mods_and_reorder.xsl. | |
--sibling Specifies the PID of one existing child object in need of a sibling. | |
--source Specifies the DC field from which /mods/extension/creators is to be constructed OR, | |
in the case of CopyDatastream the PID of the source object. Default is 'dc:creator'. | |
--substitutionsFile In place of 'find' and 'replace', this option specifies the path to a 'csv' style file from which 'find, replace' pairs will | |
be read. | |
--title Specifies a datastream title (label) or XML element value when needed. Default varies by use. | |
--verbose Triggers verbose output in certain commands. | |
--xpath Specifies a metadata XPath whenever one is needed. Note that it is wise to put your XPath in double quotes and use single | |
quotes within where necessary. | |
--xsl Specifies the path to the MODS-to-DC transform XSL file to be applied. Defaults to public://mods_to_dc_grinnell.xsl. | |
Aliases: iduF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment