Add DCF (Debian Control Format) as supported file type (#1970)

* reader

* record writer

* pkg/output/record_writer_dcf.go

* test/input/test.dcf

* test/cases/io-dcf/

* pkg/cli/option_parse.go

* make fmt

* make dev

* docs and `make dev`
This commit is contained in:
John Kerl 2026-02-16 11:10:39 -05:00 committed by GitHub
parent a5f4c9d895
commit daae7ff7f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 579 additions and 29 deletions

View file

@ -0,0 +1 @@
mlr --itsv --rs lf --odcf cat test/input/simple.tsv

View file

View file

@ -0,0 +1,30 @@
a: pan
b: pan
i: 1
x: 2
y: 0.98994500
a: eks
b: pan
i: 2
x: 1
y: 0.77515900
a: wye
b: wye
i: 3
x: 1
y: 0.76164200
a: eks
b: wye
i: 4
x: 5
y: 0.32293400
a: wye
b: pan
i: 5
x: 5
y: 0.44828300

View file

@ -0,0 +1 @@
mlr --icsv --odcf cat ${CASEDIR}/input

View file

View file

@ -0,0 +1,4 @@
a: 1
b: 2|3
c: 4

View file

@ -0,0 +1,2 @@
a,b,c
1,2|3,4

View file

@ -0,0 +1 @@
mlr --idcf --odcf cat test/input/test.dcf

View file

View file

@ -0,0 +1,10 @@
Package: foo
Version: 1.0
Depends: libc6 (>= 2.0), libfoo (>= 1.2)
Description: A test package.
Package: bar
Version: 2.0
Recommends: foo
Description: Another package.

View file

@ -0,0 +1 @@
mlr --idcf --ojson cat test/input/test.dcf

View file

View file

@ -0,0 +1,14 @@
[
{
"Package": "foo",
"Version": "1.0",
"Depends": ["libc6 (>= 2.0)", "libfoo (>= 1.2)"],
"Description": "A test package."
},
{
"Package": "bar",
"Version": "2.0",
"Recommends": ["foo"],
"Description": "Another package."
}
]

9
test/input/test.dcf Normal file
View file

@ -0,0 +1,9 @@
Package: foo
Version: 1.0
Depends: libc6 (>= 2.0), libfoo (>= 1.2)
Description: A test package.
Package: bar
Version: 2.0
Recommends: foo
Description: Another package.