-
Notifications
You must be signed in to change notification settings - Fork 10
Metadata manipulator: PiratizeAbstract
This sample metadata manipulator converts text within MODS <abstract>
elements into pirate speak using the http://isithackday.com/arrpi.php API.
This metadata manipulator applies to all toolchains that output MODS documents.
To register this manipulator in your toolchain, add the following line to the "[MANIPULATORS]" section of your .ini file:
metadatamanipulators[] = "PiratizeAbstract"
Also note that the mappings file must contain a mapping to the MODS <abstract>
element.
This manipulator does not take any parameters.
The purpose of this metadata manipulator is to illustrate how you can call a web service and use the results to update your metadata. For example, it will convert
<abstract>A waterfront and shipping scene in Vancouver, B.C. Several vessels are shown along the waterfront.</abstract>
into
<abstract>A waterfront and shipping scene in Vancouver, B.C. Several vessels be shown along thar waterfront.</abstract>
If the version of the text returned by the API is different than the original text (sometimes the API doesn't find anything in the text that has a pirate equivalent), it logs the original and the new versions.
Content on the Move to Islandora Kit wiki is licensed under a Creative Commons Attribution 4.0 International License.