Top Level Namespace

Defined in:

Constant Summary

SCHEMA = "---\nname: import\ndescription: Import CSV, JSON, or YAML into C0DATA compact format\npositional:\n - format\n - file\nproperties:\n format:\n type: string\n description: Input format (csv, json, yaml) or input file. Auto-detected if omitted.\n file:\n type: string\n description: Input file (reads stdin if omitted)\n output:\n type: string\n short: o\n description: Output file (stdout if omitted)\n group:\n type: string\n short: g\n description: Group name (defaults to filename stem or 'data')\n---\nname: export\ndescription: Export C0DATA to CSV, JSON, or YAML\npositional:\n - format\n - file\nrequired:\n - format\nproperties:\n format:\n type: string\n enum: [csv, json, yaml]\n description: Output format\n file:\n type: string\n description: Input C0DATA file (reads stdin if omitted)\n output:\n type: string\n short: o\n description: Output file (stdout if omitted)\n---\nname: pretty\ndescription: Convert C0DATA to pretty-printed Unicode form\npositional:\n - file\nproperties:\n file:\n type: string\n description: Input file (reads stdin if omitted)\n output:\n type: string\n short: o\n description: Output file (stdout if omitted)\n---\nname: compact\ndescription: Convert C0DATA to compact binary form\npositional:\n - file\nproperties:\n file:\n type: string\n description: Input file (reads stdin if omitted)\n output:\n type: string\n short: o\n description: Output file (stdout if omitted)\n---\nname: validate\ndescription: Validate C0DATA structure\npositional:\n - file\nproperties:\n file:\n type: string\n description: Input file (reads stdin if omitted)\n stream:\n type: boolean\n short: s\n description: Validate as a stream-mode log (report torn tail)"

Method Summary

Method Detail

def detect_format(file : String | Nil, content : String) : String | Nil #

Auto-detect import format from file extension or content sniffing


[View source]
def pretty_input?(input : String) : Bool #

Detect if input contains Unicode Control Pictures (pretty format)


[View source]
def to_compact(input : String) : Bytes #

Convert input to compact bytes, auto-detecting pretty vs compact


[View source]