huc-tapir 0.7.6

Text & Annotation Processor for Indexing Resources
huc-tapir-0.7.6 is not a library.

tapir -h

tapir

Text & Annotation Processor for Indexing Resources

Usage

tapir [OPTIONS]

Options:
  -i, --input <INPUT>            Input W3C Web Annotation file (in JSONL) [default: stdin]
  -o, --output <OUTPUT>          Output ElasticSearch index file (in JSON) [default: stdout]
  -f, --with-field <FIELDS>      Add field to index. Use 'key=value' for custom mapping, or 'key' to use the key as both field name and value
  -b, --with-bib-ref <BIB_REFS>  Extract bibliography refs from Reference annotations having, e.g., body.subtype=='BibReference#vangogh'
  -s, --sort-field <SORT_FIELDS> Sort elements in this field, e.g. personId or correspondentLabel
  -p, --pretty                   Pretty print the generated ElasticSearch index file
  -q, --quiet                    Quiet mode
  -w, --workdir <WORKDIR>        Workdir containing extracted text files (in TXT) for <input> [default: ./work]
  -h, --help                     Print help
  -V, --version                  Print version

Example use in Makefile

work/%.index.json: work/%.webannotations.jsonl
	tapir \
		--with-field correspondent=participant \
		--with-field correspondentId=participantId \
		--with-field file=n \
		--with-field location \
		--with-field msId=identifier \
		--with-field period=namedPeriod \
		--with-field recipient \
		--with-field sender \
		--with-field title \
		--with-bib-ref vangogh=mentionedByVanGogh \
		--sort-field artworkIds,artworksEN, \
		--sort-field correspondent,correspondentId \
		--quiet \
		--input $< \
		--output $@