Merge pull request #537 from johnkerl/comment-handling

Port data-comment-handling feature from C to Go, all but JSON
This commit is contained in:
John Kerl 2021-05-26 12:32:51 +00:00 committed by GitHub
commit f5c343be04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
160 changed files with 309 additions and 157 deletions

View file

@ -1 +0,0 @@
mlr --skip-comments --inidx --oxtab cat regtest/input/comments/comments1.nidx

View file

@ -1 +0,0 @@
mlr --pass-comments --inidx --oxtab cat regtest/input/comments/comments1.nidx

View file

@ -1 +0,0 @@
mlr --skip-comments --inidx --oxtab cat regtest/input/comments/comments2.nidx

View file

@ -1 +0,0 @@
mlr --pass-comments --inidx --oxtab cat regtest/input/comments/comments2.nidx

View file

@ -1 +0,0 @@
mlr --skip-comments --inidx --oxtab cat regtest/input/comments/comments3.nidx

View file

@ -1 +0,0 @@
mlr --pass-comments --inidx --oxtab cat regtest/input/comments/comments3.nidx

View file

@ -1 +1 @@
mlr --inidx --opprint --from regtest/input/s.nidx --from regtest/input/t.nidx put -f ./${CASEDIR}/mlr
mlr --inidx --ifs space --opprint --from regtest/input/s.nidx --from regtest/input/t.nidx put -f ./${CASEDIR}/mlr

View file

@ -1,8 +1,8 @@
1 nf nr fnr filenum
pan pan 1 0.3467901443380824 0.7268028627434533 1 1 1 1
eks pan 2 0.7586799647899636 0.5221511083334797 1 2 2 1
wye wye 3 0.20460330576630303 0.33831852551664776 1 3 3 1
eks wye 4 0.38139939387114097 0.13418874328430463 1 4 4 1
wye pan 5 0.5732889198020006 0.8636244699032729 1 5 1 2
zee pan 6 0.5271261600918548 0.49322128674835697 1 6 2 2
eks zee 7 0.6117840605678454 0.1878849191181694 1 7 3 2
1 2 3 4 5 nf nr fnr filenum
pan pan 1 0.3467901443380824 0.7268028627434533 5 1 1 1
eks pan 2 0.7586799647899636 0.5221511083334797 5 2 2 1
wye wye 3 0.20460330576630303 0.33831852551664776 5 3 3 1
eks wye 4 0.38139939387114097 0.13418874328430463 5 4 4 1
wye pan 5 0.5732889198020006 0.8636244699032729 5 5 1 2
zee pan 6 0.5271261600918548 0.49322128674835697 5 6 2 2
eks zee 7 0.6117840605678454 0.1878849191181694 5 7 3 2

View file

@ -1 +1 @@
mlr --idkvp --ojson --from regtest/input/s.dkvp --from regtest/input/t.dkvp put -f ./${CASEDIR}/mlr
mlr --idkvp --ojson --jvstack --from regtest/input/s.dkvp --from regtest/input/t.dkvp put -f ./${CASEDIR}/mlr

View file

@ -1 +1 @@
mlr --inidx --oxtab cat ./${CASEDIR}/input
mlr --inidx --ifs space --oxtab cat ./${CASEDIR}/input

View file

@ -1,6 +1 @@
1 a
2 b
3 c
4 d
5 e
6 f
1 a,b,c,d,e,f

View file

@ -1 +1 @@
mlr --inidx --oxtab cat ./${CASEDIR}/input
mlr --inidx --ifs space --oxtab cat ./${CASEDIR}/input

View file

@ -1 +1,6 @@
1 a b c d e f
1 a
2 b
3 c
4 d
5 e
6 f

View file

@ -1 +1 @@
mlr --inidx --ifs , --oxtab cat ./${CASEDIR}/input
mlr --inidx --ifs comma --oxtab cat ./${CASEDIR}/input

View file

@ -1 +1 @@
mlr --inidx --ifs ' ' --oxtab cat ./${CASEDIR}/input
mlr --inidx --ifs space --oxtab cat ./${CASEDIR}/input

View file

@ -1 +1 @@
mlr --inidx --ifs ' ' --oxtab cat ./${CASEDIR}/input
mlr --inidx --ifs space --oxtab cat ./${CASEDIR}/input

View file

@ -1 +1 @@
mlr --c2j cat regtest/input/s.csv
mlr --c2j --jvstack cat regtest/input/s.csv

View file

@ -1 +1 @@
mlr --icsv --ojson cat regtest/input/implicit.csv
mlr --icsv --ojson --jvstack cat regtest/input/implicit.csv

View file

@ -1 +1 @@
mlr --implicit-csv-header --icsv --ojson cat regtest/input/implicit.csv
mlr --implicit-csv-header --icsv --ojson --jvstack cat regtest/input/implicit.csv

View file

@ -1 +1 @@
mlr --icsvlite --ojson cat regtest/input/s.csv
mlr --icsvlite --ojson --jvstack cat regtest/input/s.csv

View file

@ -1 +1 @@
mlr --icsvlite --implicit-csv-header --ojson cat regtest/input/implicit.csv
mlr --icsvlite --implicit-csv-header --ojson --jvstack cat regtest/input/implicit.csv

View file

@ -1 +1 @@
mlr --icsvlite --ojson --allow-ragged-csv-input cat regtest/input/ragged-short.csv
mlr --icsvlite --allow-ragged-csv-input --ojson --jvstack cat regtest/input/ragged-short.csv

View file

@ -1 +1 @@
mlr --icsvlite --ojson --allow-ragged-csv-input cat regtest/input/ragged-long.csv
mlr --icsvlite --allow-ragged-csv-input --ojson --jvstack cat regtest/input/ragged-long.csv

View file

@ -1 +1 @@
mlr --icsv --ojson --allow-ragged-csv-input cat regtest/input/ragged-short.csv
mlr --icsv --allow-ragged-csv-input --ojson --jvstack cat regtest/input/ragged-short.csv

View file

@ -1 +1 @@
mlr --icsv --ojson --allow-ragged-csv-input cat regtest/input/ragged-long.csv
mlr --icsv --allow-ragged-csv-input --ojson --jvstack cat regtest/input/ragged-long.csv

View file

@ -1 +1 @@
mlr --ixtab --ojson cat regtest/input/test-1.xtab
mlr --ixtab --ojson --jvstack cat regtest/input/test-1.xtab

View file

@ -1 +1 @@
mlr --ixtab --ojson cat regtest/input/test-2.xtab
mlr --ixtab --ojson --jvstack cat regtest/input/test-2.xtab

View file

@ -1 +1 @@
mlr --ixtab --ojson cat regtest/input/test-3.xtab
mlr --ixtab --ojson --jvstack cat regtest/input/test-3.xtab

View file

@ -1 +1 @@
mlr --ixtab --ojson cat regtest/input/test-1.xtab regtest/input/test-2.xtab
mlr --ixtab --ojson --jvstack cat regtest/input/test-1.xtab regtest/input/test-2.xtab

View file

@ -1 +1 @@
mlr --ixtab --ojson cat regtest/input/test-2.xtab regtest/input/test-1.xtab
mlr --ixtab --ojson --jvstack cat regtest/input/test-2.xtab regtest/input/test-1.xtab

View file

@ -1 +1 @@
mlr --ixtab --ojson cat regtest/input/test-1.xtab regtest/input/test-2.xtab regtest/input/test-3.xtab
mlr --ixtab --ojson --jvstack cat regtest/input/test-1.xtab regtest/input/test-2.xtab regtest/input/test-3.xtab

View file

@ -1 +1 @@
mlr --ojson --from regtest/input/s.dkvp head -n 1
mlr --ojson --jvstack --from regtest/input/s.dkvp head -n 1

View file

@ -1 +1 @@
mlr --ojson --from regtest/input/s.dkvp head -n 2
mlr --ojson --jvstack --from regtest/input/s.dkvp head -n 2

View file

@ -1 +1 @@
mlr --ojson --from regtest/input/s.dkvp head -n 3
mlr --ojson --jvstack --from regtest/input/s.dkvp head -n 3

View file

@ -1 +1 @@
mlr --jlistwrap --ojson --from regtest/input/s.dkvp head -n 0
mlr --jlistwrap --ojson --jvstack --from regtest/input/s.dkvp head -n 0

View file

@ -1 +1 @@
mlr --jlistwrap --ojson --from regtest/input/s.dkvp head -n 1
mlr --jlistwrap --ojson --jvstack --from regtest/input/s.dkvp head -n 1

View file

@ -1 +1 @@
mlr --jlistwrap --ojson --from regtest/input/s.dkvp head -n 2
mlr --jlistwrap --ojson --jvstack --from regtest/input/s.dkvp head -n 2

View file

@ -1 +1 @@
mlr --jlistwrap --ojson --from regtest/input/s.dkvp head -n 3
mlr --jlistwrap --ojson --jvstack --from regtest/input/s.dkvp head -n 3

View file

@ -0,0 +1 @@
mlr --skip-comments --inidx --ifs space --oxtab cat regtest/input/comments/comments1.nidx

View file

@ -0,0 +1 @@
mlr --pass-comments --inidx --ifs space --oxtab cat regtest/input/comments/comments1.nidx

Some files were not shown because too many files have changed in this diff Show more