Skip to main content

parse_import_line

Function parse_import_line 

Source
pub fn parse_import_line(line: &str) -> Result<ImportSpec, String>
Expand description

Parse an import-csv> prompt line into an [ImportSpec]. Mirrors the CLI’s import-csv <db> <file.csv> <measure-id> <measure-name> <value-col> <dim-col:cat-id:cat-name> [...] [--tsv] [--no-header] syntax, minus the leading <db> (the TUI’s already-open model plays that role). Whitespace- separated, like the CLI’s own argv; no quoting support (a filename with a space isn’t representable, matching the CLI’s own simplicity).

Terminal-free -> unit-testable without a running TUI.