Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...



process

When and the unit of processing for an extractor. In the example above, the word count extractor is processed on a single file. Below is an example of starting an extractor 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:

...