...
Code Block |
---|
{ "@context": "http://clowder.ncsa.illinois.edu/contexts/extractors.jsonld", "name": "ncsa.wordcount", "version": "2.0", "description": "WordCount extractor. Counts the number of characters, words and lines in the text file that was uploaded.", "author": "Rob Kooper <kooper@illinois.edu>", "contributors": [], "contexts": [ { "lines": "http://clowder.ncsa.illinois.edu/metadata/ncsa.wordcount#lines", "words": "http://clowder.ncsa.illinois.edu/metadata/ncsa.wordcount#words", "characters": "http://clowder.ncsa.illinois.edu/metadata/ncsa.wordcount#characters" } ], "repository": [ { "repType": "git", "repUrl": "https://opensource.ncsa.illinois.edu/stash/scm/cats/pyclowder.git" } ], "process": { "file": [ "text/*", "application/json" ] }, "external_services": [], "dependencies": [], "labels": [], "bibtex": [] } |
...
contexts
This field can be left empty, but it is the place where you can define what the metadata fields returned from your extractor mean.
process
Controls when/how an extractor is submitted based on Clowder events. To see a full list of event types refer to Extractor Basics### process
When and the unit of processing for an extractor. In the example above, the word count extractor is processed manually on a single file. Below is an example of starting an extractor automatically when a file is added to a dataset:
Code Block |
---|
"process": { "dataset": [ "file.added" ] }, |
...
dependencies
a list of packages the extractor depends upon
Code Block |
---|
"dependencies": [ "imagemagick", "ufraw-batch" ], |
...
parameters
Allows parameters to be passed to extractor upon submission.
...
Code Block |
---|
"parameters":{ "schema": { "fields": { "type": "string", "title": "Naming Fields", "default": "None" } }, "form": [ { "key": "fields", "notitle":false } ] }, |
The following shows up as such above code translates as the following within Clowder:
A more complicated example:
...