Skip to content

Add better option descriptions#72

Merged
Ostrzyciel merged 4 commits intomainfrom
37-description-well-formatted
Apr 9, 2025
Merged

Add better option descriptions#72
Ostrzyciel merged 4 commits intomainfrom
37-description-well-formatted

Conversation

@Karolina-Bogacka
Copy link
Collaborator

Issue: #37

@Karolina-Bogacka
Copy link
Collaborator Author

Context on how it it looks for the user:

Usage: jelly-cli rdf to-jelly [options] [<file-to-convert>]
Translates an RDF file to a Jelly-RDF stream. 
If no input file is specified, the input is read from stdin.
If no output file is specified, the output is written to stdout.
If an error is detected, the program will exit with a non-zero code.
Otherwise, the program will exit with code 0.
Note: this command works in a streaming manner and scales well to large files. 

Help options:
  --usage            Print usage and exit
  -h, -help, --help  Print help message and exit

Other options:
  --debug                              Add to run command in debug mode. 
  --quiet                              Add to silence any warnings. 
  --to, --output-file string?          Output file to write the Jelly to. If not specified, the output is written to stdout.
  --in-format, --input-format string?  RDF format of the data that should be translated to Jelly. If not explicitly specified, but input file supplied, the format is inferred from the file name. Possible values: "nq", "nquads" for N-Quads, "nt", "ntriples" for N-Triples, "jelly-text" for Jelly text format, "ttl", "turtle" for Turtle, "trig" for TriG, "jenaproto", "jena-proto" for RDF Protobuf, "jenathrift", "jena-thrift" for RDF Thrift, "rdfxml", "rdf-xml" for RDF/XML, "jsonld", "json-ld" for JSON-LD. Default format: N-Quads
  --opt.stream-name string             Name of the output stream (in metadata). Default: (empty)
  --opt.generalized-statements         Whether the stream may contain generalized triples, quads, or datasets. Default: true
  --opt.rdf-star                       Whether the stream may contain RDF-star statements. Default: true
  --opt.max-name-table-size int        Maximum size of the name lookup table. Default: 4000
  --opt.max-prefix-table-size int      Maximum size of the prefix lookup table. Default: 150
  --opt.max-datatype-table-size int    Maximum size of the datatype lookup table. Default: 32
  --opt.logical-type string?           Logical (RDF-STaX-based) stream type. This can be either a name like `FLAT_QUADS` or a full IRI like `https://w3id.org/stax/ontology#flatQuadStream`. Default: (unspecified)
  --rows-per-frame int                 Target number of rows per frame – the writer may slightly exceed that. Default: 256
  --enable-namespace-declarations      Whether to preserve explicit namespace declarations in the output (PREFIX: in Turtle). Default: false
  --delimited                          Whether the output should be delimited. Setting it to false will force the output to be a single frame – make sure you know what you are doing. Default: true

@Karolina-Bogacka
Copy link
Collaborator Author

Karolina-Bogacka commented Apr 9, 2025

Usage: jelly-cli rdf inspect [options] [<file-to-inspect>]
Prints statistics about a Jelly-RDF stream.
Statistics include: Jelly stream options and counts of various row types, including triples, quads, names, prefixes, namespaces, datatypes, and graphs.
Output statistics are returned as a valid YAML. 
If no input file is specified, the input is read from stdin.
If no output file is specified, the output is written to stdout.
If an error is detected, the program will exit with a non-zero code.
Otherwise, the program will exit with code 0.
Note: this command works in a streaming manner and scales well to large files. 

Help options:
  --usage            Print usage and exit
  -h, -help, --help  Print help message and exit

Other options:
  --debug                      Add to run command in debug mode. 
  --quiet                      Add to silence any warnings. 
  --to, --output-file string?  File to write the output statistics to. If not specified, the output is written to stdout.
  --per-frame, --per-frame     Whether to print the statistics per frame (default: false). If true, the statistics are computed and printed separately for each frame in the stream.

@Karolina-Bogacka
Copy link
Collaborator Author

Karolina-Bogacka commented Apr 9, 2025

Usage: jelly-cli rdf from-jelly [options] [<file-to-convert>]
Translates a Jelly-RDF stream to a different RDF format. 
If no input file is specified, the input is read from stdin.
If no output file is specified, the output is written to stdout.
If an error is detected, the program will exit with a non-zero code.
Otherwise, the program will exit with code 0.
Note: this command works in a streaming manner and scales well to large files

Help options:
  --usage            Print usage and exit
  -h, -help, --help  Print help message and exit

Other options:
  --debug                                Add to run command in debug mode. 
  --quiet                                Add to silence any warnings. 
  --to, --output-file string?            Output file to write the RDF to. If not specified, the output is written to stdout.
  --out-format, --output-format string?  RDF format Jelly should be translated to. If not explicitly specified, but output file supplied, the format is inferred from the file name. Possible values: "nq", "nquads" for N-Quads, "nt", "ntriples" for N-Triples, "jelly-text" for Jelly text format, "ttl", "turtle" for Turtle, "trig" for TriG, "jenaproto", "jena-proto" for RDF Protobuf, "jenathrift", "jena-thrift" for RDF Thrift. Default format: N-Quads

@Ostrzyciel Ostrzyciel merged commit a8f4c03 into main Apr 9, 2025
7 checks passed
@Ostrzyciel Ostrzyciel deleted the 37-description-well-formatted branch April 9, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants