PhoenixKit.Modules.Shop.Import.FormatDetector (phoenix_kit v1.7.71)

Copy Markdown View Source

Auto-detect CSV format from file headers.

Iterates known format modules and calls detect?/1 on each. First match wins, so order matters.

Summary

Functions

Detect format module from CSV file path. Returns {:ok, format_module} or {:error, :unknown_format}.

Detect format module from pre-extracted headers.

Returns human-readable format name.

Functions

detect(path)

Detect format module from CSV file path. Returns {:ok, format_module} or {:error, :unknown_format}.

detect_from_headers(headers)

Detect format module from pre-extracted headers.

format_name(arg1)

Returns human-readable format name.