Wiki
Clone wikiSparna / HowTo-RunSKOSPlayCommandLine
How to run SKOS Play from the command line ?
Starting with version 0.7.0, SKOS Play comes with a command-line application to generate PDF and HTML reports from SKOS files. This allows to easily integrate the generation of such files in a vocabulary publishing process/script.
Instructions
- Download the file skos-play-cli-x.y.z-onejar.jar from the download section;
- Make sure you have Java >= 6 installed and available;
- Open a terminal/prompt where you downloaded the command-line application, and run :
#!bash
java -jar skos-play-cli-x.y.z-onejar.jar
- Make sure you have a SKOS file available somewhere, and try some of the commands :
Generate an alphabetical index in PDF (adjust the path to the file and the 2-letters language code) :
#!bash
java -jar skos-play-cli-0.7.0-onejar.jar alphabetical -i /path/to/skos/file.rdf -o alphabetical.pdf -l en
Generate a hierarchical index in HTML (adjust the path to the file and the 2-letters language code) :
#!bash
java -jar skos-play-cli-0.7.0-onejar.jar hierarchical -i /path/to/skos/file.rdf -o hierarchy.html -f html -l en
Generate a complete multilingual index in PDF, including alphabetical index, hierarchy, and translation tables (adjust the path to the file and the 2-letters language code) :
#!bash java -jar skos-play-cli-0.7.0-onejar.jar complete -i /path/to/skos/file.rdf -o complete -l en -m
Full help message of version 0.7.0
Usage: <main class> [options] [command] [command options] Options: -h, --help Prints the help message Default: false -l, --log Reference to a log4j configuration file Commands: alignment Generates an alignment report. Usage: alignment [options] Options: -bsc, --bySourceConcept Generates the output by listing source concepts instead of grouping by target scheme. Default: false -c, --cache Cache directory when fetching alignments. Defaults to 'alignment-cache'. Default: alignment-cache -fop, --fopConfig FOP config file -f, --format Output format. Values can be either 'html' or 'pdf'. Defaults to pdf. Default: PDF * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. * -o, --output Output file -cs, --scheme URI of ConceptScheme to print -s, --style Output style. Values can be either 'default' or 'unesco'. Defaults to 'default'. Default: DEFAULT alphabetical Generates an alphabetical report. Usage: alphabetical [options] Options: -fop, --fopConfig FOP config file -f, --format Output format. Values can be either 'html' or 'pdf'. Defaults to pdf. Default: PDF * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. -m, --multilingual Also includes translations in other languages and translation tables. Defaults to false. Default: false * -o, --output Output file -cs, --scheme URI of ConceptScheme to print -s, --style Output style. Values can be either 'default' or 'unesco'. Defaults to 'default'. Default: DEFAULT hierarchical Generates a hierarchical report. Usage: hierarchical [options] Options: -fop, --fopConfig FOP config file -f, --format Output format. Values can be either 'html' or 'pdf'. Defaults to pdf. Default: PDF * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. * -o, --output Output file -cs, --scheme URI of ConceptScheme to print -s, --style Output style. Values can be either 'default' or 'unesco'. Defaults to 'default'. Default: DEFAULT complete Generates an alphabetical report Usage: complete [options] Options: -c, --cache Cache directory when fetching alignments. Defaults to 'alignment-cache'. Default: alignment-cache -fop, --fopConfig FOP config file -f, --format Output format. Values can be either 'html' or 'pdf'. Defaults to pdf. Default: PDF * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. -m, --multilingual Also includes translations in other languages. Defaults to false. Default: false * -o, --output Output file -cs, --scheme URI of ConceptScheme to print -s, --style Output style. Values can be either 'default' or 'unesco'. Defaults to 'default'. Default: DEFAULT translation Generates a complete report. Usage: translation [options] Options: -fop, --fopConfig FOP config file -f, --format Output format. Values can be either 'html' or 'pdf'. Defaults to pdf. Default: PDF * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. * -o, --output Output file -cs, --scheme URI of ConceptScheme to print -s, --style Output style. Values can be either 'default' or 'unesco'. Defaults to 'default'. Default: DEFAULT normalize Usage: normalize [options] Options: * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. * -o, --output Output file -cs, --scheme URI of ConceptScheme to normalize index Generates a complete report. Usage: index [options] Options: -fop, --fopConfig FOP config file -f, --format Output format. Values can be either 'html' or 'pdf'. Defaults to pdf. Default: PDF * -i, --input RDF files, directory or endpoint URL * -l, --lang Language code to use. * -o, --output Output file -cs, --scheme URI of ConceptScheme to print -s, --style Output style. Values can be either 'default' or 'unesco'. Defaults to 'default'. Default: DEFAULT -t, --type Index style. Values can be either 'kwic' or 'kwoc' or 'kwac'. Default: KWIC skos2skosxl Converts a SKOS file to SKOS-XL file Usage: skos2skosxl [options] Options: -b, --bnodes Use bnodes for generated xl:Label Default: false * -i, --input RDF files, directory or endpoint URL -n, --notes Also reifies the notes, definitions, scopeNotes, etc. Default: false * -o, --output Output file
Updated