atextor / owl-cli

Command line tool for ontology engineering
Apache License 2.0
14 stars 2 forks source link

Improved `<COMMAND> --help` #25

Open hoijui opened 1 month ago

hoijui commented 1 month ago

When using e.g. owl write --help or owl write -h or owl write, one gets:

 $ java -jar cli/build/libs/owl-cli-snapshot.jar write --help
18:33:59.822 [main] DEBUG org.apache.jena.riot.system.stream.JenaIOEnvironment -- Failed to find configuration: location-mapping.ttl;location-mapping.rdf;etc/location-mapping.rdf;etc/location-mapping.ttl
Error: Missing required parameter: 'INPUT'
Usage: owl write [-v] [--alignObjects] [--alignPredicates]
                 [--doNotInsertFinalNewline] [--firstPredicateInNewLine]
                 [--keepUnusedPrefixes] [--useCommaByDefault]
                 [--useLongLiterals] [--writeRdfType]
                 [--afterComma=<afterCommaGapStyle>]
                 [--anonymousNodeIdPattern=<anonymousNodeIdPattern>]
                 [--continuationIndentSize=<continuationIndentSize>]
                 [--doubleFormat=<doubleFormatPattern>] [--encoding=<encoding>]
                 [--endOfLine=<endOfLineStyle>] [-i=<inputFormat>]
                 [--indent=<indentStyle>] [--indentSize=<indentSize>]
                 [-o=<outputFormat>] [--prefixAlign=<alignPrefixes>]
                 [--commaForPredicate=<commaForPredicate>]...
                 [--noCommaForPredicate=<noCommaForPredicate>]...
                 [--objectOrder=<objectOrder>]... [-p=<String=URI>]...
                 [--predicateOrder=<predicateOrder>]...
                 [--prefixOrder=<prefixOrder>]...
                 [--subjectOrder=<subjectOrder>]... INPUT [OUTPUT]

There is no warning about -h or --help being an unknown option, nor that one should use owl help write instead, and the shown Usage info is not enough to use the CLI (while the output of owl help write is). Could this somehow be improved, and if yes, how best to do that?

atextor commented 1 month ago

Any combination of: