Closed Andrew-Morozko closed 4 months ago
the specs for CLI:
2 subcommands:
render
target
-- a required positional argument. Specifies the name of the document to be rendered as document.<name>
.--out-file
-- an optional argument. Specifies the name of the output file where the rendered document must be saved to.--out-file
is not set, the Markdown is printed to stdoutdata
the subcommand executes the data blog and prints out prettified (and highlighted) JSON to stdout
target
-- a required positional argument. Specifies a path to a data block to be executed -- a data block must be inside a document, so the path should have syntax of document.<doc-name>.data.<plugin-name>.<data-name>
.
--source-dir
-- an optional argument that accepts a path to a directory with *.fabric
files. Default value: .
(current directory)--log-output
-- an optional argument that accepts plain
or json
. Configures a handler for the logging. Default value: plain
(colored plain text output)--logging-level
-- an optional argument that specifies the logging level. Default value: info
-v
-- a shortcut to --logging-level debug
moved the spec to https://github.com/blackstork-io/fabric/issues/70
Reimplemented parsing in cobra with minimal tweaks to the text of the spec.
Cobra argument parsing, default slog logger configuration, and remote plugin logging are done. Ready to be merged as soon as we write some description for fabric --help
(see review comment)
49 but on top of the current main branch, git defeated me:(