Commit 32c52b02 authored by Mark Jordan's avatar Mark Jordan
Browse files

Update README.md.

parent b33e760f
......@@ -20,7 +20,7 @@ Currently only works with single-file content types.
### Running the script
`python fetch_collection.py`
`python fetch_collection`
Agree to the terms of use, select a collection, specify an output directory, and hit enter. Output will look like this (assuming you specified `output` as your output directory):
......@@ -42,13 +42,21 @@ Each Islandora object will be saved in its own subdirectory named after the obje
### Plugins
Plugins are simple Python modules that act on the retrived object just after it is saved to disk. Plugins are not registered; if a file ending in `.py` is in the `CollectionFetcherPlugins` subdirectory, its `execute` function will be executed, with the following as arguments:
#### Overview
Plugins are simple Python modules that act on the retrived object just after it is saved to disk. Currently, fetch_collection comes with two plugins, one that writes out the manifest file and the other that changes the extension on JPEG files from `.jpe` to `.jpg`.
#### Writing your own plugins
To write your own plugin, add a Python file (must end in `.py`) to the `CollectionFetcherPlugins`. The file must contain an `execute` method that takes the following arguments:
* `dir`: the object's output directory
* `pid`: the object's PID
* `cmodel`: the object's content model, in the form `info:fedora/islandora:sp_basic_image`
* `label`: the object's label
Your plugin doesn't need to be registered; its presence in the `CollectionFetcherPlugins` directory is sufficient.
## Maintainer
* [Mark Jordan](https://github.com/mjordan)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment