flatml(1) General Commands Manual
NAME
flatml — A shell filter flattening markup properties in XML
, JSON
or YAML
format to a key/value “per line” format.
SYNOPSIS
flatml | [ -i <inputFile> ] [ -o <outputFile> ] [ { --output-format <outputFormat> | [ --delimiter <delimiter> ] [ --sort ] [ -e ] } ] [ -t <timeout> ] [ -v ] [ -d ] |
flatml | -h | --sysinfo [ -v ] |
DESCRIPTION
This manual page documents the flatml command: The flatml command flattens a
markup input file --input-file
or <STDIN>
in formats XML
, JSON
or YAML
with an optional delimiter --delimiter
separating the markup hierarchy into a
flat path (defaulting to .
) and writes the flattened properties back to an output
file --output-file
or <STDOUT>
optionally converting back the output to a markup
format --output-format
of formats XML
, JSON
or YAML
and optionally sorting
--sort
the output alphabetically as well as of optionally escaping the output’s
<CR>
and line feed <LF>
characters to “\r
” and “\n
” char sequences.
Depending on the executable’s flavor the command might also be named flatml-x.y.z.jar, flatml-bundle-x86_64-x.y.z.elf, flatml-bundle-x86_64-x.y.z.exe, flatml-installer-x86_64-x.y.z.msi, flatml-launcher-x.y.z.sh, flatml-launcher-x86_64-x.y.z.elf, flatml-launcher-x86_64-x.y.z.exe, flatml-native-x86_64-x.y.z.elf where x.y.z stands for the version of the flatml command. The according executable’s name will be referenced to in this manual as flatml.
OPTIONS
-d --debug: | Enables the debug mode with additional (developer readable) informational output. |
--delimiter <delimiter>: | The delimiter to be used when separating the markup hierarchy into a flat path. If omitted, then “. ” is used. |
-e --escape: | Escapes any carriage return <CR> and line feed <LF> characters to “\r ” and “\n ” char sequences accordingly. |
-h --help: | Shows this help. |
-i --input-file <inputFile>: | The input markup (XML , JSON , YAML ) file from which to read the values. If omitted, then <STDIN> is used. |
-o --output-file <outputFile>: | The (flat) output file to which to write the values, if omitted, then <STDOUT> is used. |
--output-format <outputFormat>: | Specifies the output format instead of flattened properties: { XML , JSON , YAML } |
--sort: | Sorts the keys of the flattened markup. |
--sysinfo: | Shows some system information for debugging purposes. |
-t --timeout <timeout>: | Specifies the timeout (seconds) to wait for input, a value of -1 disables the dedicated timeout. |
-v --verbose: | Enables the verbose mode with additional (human readable) informational output. |
EXAMPLES
Flattens markup from <STDIN>
to <STDOUT>
:
- flatml
Flattens markup from <STDIN>
to <STDOUT>
with given delimiter:
- flatml --delimiter <delimiter>
Converts markup from <STDIN>
to <STDOUT>
using given output format:
- flatml --output-format <outputFormat>
Flattens markup from <STDIN>
to <STDOUT>
with given delimiter using given output format:
- flatml --delimiter <delimiter> --output-format <outputFormat>
Flattens markup from <STDIN>
to output file:
- flatml -o <outputFile>
Flattens markup from <STDIN>
to output file with given delimiter:
- flatml -o <outputFile> --delimiter <delimiter>
Flattens markup from <STDIN>
to output file using a timeout:
- flatml -o <outputFile> -t <timeout>
Flattens markup from input file to <STDOUT>
:
- flatml -i <inputFile>
Flattens markup from input file to output file:
- flatml -i <inputFile> -o <outputFile>
To show the help text:
- flatml -h
To print the system info:
- flatml --sysinfo
BUGS
See BitBucket issues at <https://bitbucket.org/funcodez/funcodes-flatml/issues>
AUTHOR
Siegfried Steiner steiner@refcodes.org