Liking cljdoc? Tell your friends :D

clj-string-layout.cli

Command-line entry point for formatting CSV, TSV, or whitespace input.

Command-line entry point for formatting CSV, TSV, or whitespace input.
raw docstring

-mainclj

(-main & args)
source

csv-row-seqclj

(csv-row-seq r)

Returns a lazy sequence of row vectors read from a java.io.Reader.

Handles multi-line quoted fields by assembling physical lines until the running quote count is balanced, then parsing the assembled logical line with parse-csv. The reader is not closed; wrap in with-open at the call site.

Returns a lazy sequence of row vectors read from a java.io.Reader.

Handles multi-line quoted fields by assembling physical lines until the
running quote count is balanced, then parsing the assembled logical line
with parse-csv. The reader is not closed; wrap in with-open at the call
site.
sourceraw docstring

parse-argsclj

(parse-args args)

Parses CLI arguments into an options map.

This function is public so callers and tests can reuse the CLI argument behavior without invoking System/exit.

Parses CLI arguments into an options map.

This function is public so callers and tests can reuse the CLI argument
behavior without invoking System/exit.
sourceraw docstring

parse-csvclj

(parse-csv text)

Parses CSV text into row vectors.

Handles commas, CR/LF row separators, quoted fields, doubled quotes, and line breaks inside quoted fields. The parser is intentionally lenient about text after closing quotes so command-line use can handle imperfect CSV exports.

Parses CSV text into row vectors.

Handles commas, CR/LF row separators, quoted fields, doubled quotes, and line
breaks inside quoted fields. The parser is intentionally lenient about text
after closing quotes so command-line use can handle imperfect CSV exports.
sourceraw docstring

parse-inputclj

(parse-input input-format text)

Parses input text according to input-format.

input-format must be one of :csv, :tsv, or :whitespace.

Parses input text according to input-format.

input-format must be one of :csv, :tsv, or :whitespace.
sourceraw docstring

renderclj

(render {:keys [input format headers? escape? width display-width fill?]
         :or {input :csv format :plain escape? true}}
        text)

Renders parsed input text according to CLI-style options.

Options are the same keys returned by parse-args, plus optional :width (integer target width forwarded to fill-aware formats) and :display-width (a function from string to display width, useful when the caller invokes render programmatically with ANSI or wide-glyph data). Returns a vector of output lines and does not print or exit.

Renders parsed input text according to CLI-style options.

Options are the same keys returned by parse-args, plus optional :width
(integer target width forwarded to fill-aware formats) and :display-width
(a function from string to display width, useful when the caller invokes
render programmatically with ANSI or wide-glyph data). Returns a vector of
output lines and does not print or exit.
sourceraw docstring

row-seqclj

(row-seq input-format r)

Dispatches to the streaming parser for input-format and returns a lazy sequence of row vectors read from r.

Dispatches to the streaming parser for input-format and returns a lazy
sequence of row vectors read from r.
sourceraw docstring

tsv-row-seqclj

(tsv-row-seq r)

Lazy sequence of tab-separated row vectors read from a java.io.Reader.

Lazy sequence of tab-separated row vectors read from a java.io.Reader.
sourceraw docstring

usageclj

(usage)

Returns the human-readable usage string for the CLI.

Reflects whatever input and output format names are currently registered by clj-string-layout.cli/input-formats and clj-string-layout.table/formats.

Returns the human-readable usage string for the CLI.

Reflects whatever input and output format names are currently registered
by clj-string-layout.cli/input-formats and clj-string-layout.table/formats.
sourceraw docstring

whitespace-row-seqclj

(whitespace-row-seq r)

Lazy sequence of whitespace-split row vectors read from a java.io.Reader.

Skips blank lines and trims leading/trailing whitespace, matching the eager parse-whitespace behaviour.

Lazy sequence of whitespace-split row vectors read from a java.io.Reader.

Skips blank lines and trims leading/trailing whitespace, matching the
eager parse-whitespace behaviour.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close