Conversation
Adds CLI flags for format-specific configuration: - --csv-delimiter: custom field delimiter (supports \t for tab) - --csv-no-header: input CSV has no header row (returns arrays) - --csv-header: override CSV headers with comma-separated names - --xml-root: custom root element name for XML output - --xml-attr-prefix: custom attribute prefix for XML (default @) - --yaml-multi: force multi-document mode (always returns array) All options are format-aware and silently ignored when not applicable. Includes 8 integration tests covering all options and edge cases. Fixes #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds format-specific CLI flags for fine-grained control over CSV, XML, and YAML parsing/serialization.
New CLI Options
--csv-delimiter <char>\\tfor tab, single char)--csv-no-header--csv-header <fields>--xml-root <name>root)--xml-attr-prefix <prefix>@)--yaml-multiImplementation Details
parse_input_with_cli/serialize_output_with_clipass CLI options to format handlersfrom_str_with_explicit_headersadded to CSV module for header overridefrom_str_multiadded to YAML module for forced multi-doc mode--xml-rooton JSON→JSON)Tests
8 integration tests covering:
--csv-delimiter)--csv-no-header)--csv-header)--xml-root)--xml-attr-prefix)--yaml-multi)--yaml-multi(wraps in array)Fixes #28