Commit graph

104 commits

Author SHA1 Message Date
John Kerl
5801f5c0a2
Implement --csv-trim-leading-space flag (#1272)
* Implement --csv-trim-leading-space flag

* Artifacts from `make dev`
2023-04-20 13:13:55 -03:00
John Kerl
ae61dc5a4f
Fix precedence of coalesce operators ?? and ??? (#1270)
* Fix precedence of coalesce operators

* GOCC codegen

* unit-test updates

* operator-precedence documentation

* doc-build artifacts
2023-04-15 23:33:49 -04:00
John Kerl
b8f3902e6e
Treaet data-file numbers with leading + as numeric (#1269)
* accept data-file numbers with leading + as numeric

* augment unit-test cases

* artifacts from `make dev`
2023-04-15 15:57:22 -04:00
John Kerl
2d00b44ead
Better error message on unparseable TZ environment variable (#1249) 2023-03-30 08:37:33 -04:00
John Kerl
fa9b00ee64
index DSL function [WIP] (#1247) 2023-03-27 00:37:33 -04:00
John Kerl
ff659b8a7e
Add optional second base argument to int DSL function (#1244)
* Add optional second base argument to `int` DSL function

* artifacts from `make dev`

* unit-test cases

* typofix
2023-03-24 00:28:39 -04:00
John Kerl
bfc8ab5ce2
Add mlr step -a rprod for running products (#1228)
* mlr step -a rprod

* artifacts from `make dev`

* codespell
2023-03-12 13:32:23 -04:00
John Kerl
6ea94a002b
Add new upcase and downcase verbs (#1217)
* upcase/downcase verbs

* unit-test cases

* doc files

* remaining `make dev` artifacts: manpage
2023-03-04 01:08:19 -05:00
John Kerl
38d7de545d
Docs re tail -f and --records-per-batch 1 (#1218) 2023-03-04 00:15:01 -05:00
John Kerl
1c5e97b93c
Fix bug on DSL comment with no final newline (#1216) 2023-03-03 21:42:10 -05:00
John Kerl
5965d46a1f
Support more backslashed special characters in DSL strings (#1212)
* BNF mod for `\^` `\$` et al.

* go.mod go.sum

* Update DSL-build instructions

* tools/build-dsl artifacts

* Unit-test updates

* fix build error

* unit-test files
2023-03-01 01:00:25 -05:00
John Kerl
6fc33c682a
--ofmte, --ofmtf, --ofmtg (#1206) 2023-02-27 22:50:46 -05:00
John Kerl
ee0ac3d7bb
New leftpad and rightpad DSL functions (#1205)
* Initial code for `leftpad` and `rightpad` functions

* typofix, and test cases

* doc-gen

* windows UT
2023-02-26 17:14:35 -05:00
John Kerl
f3fd2c2416
Complete #1181 (#1184)
* Source impl of #1181

* Full flow for #1181
2023-01-27 22:59:14 -05:00
John Kerl
31fdc1c3ed
Fix #1164: regression on CSV blank-line handling (#1168)
* Fix #1164: regression on CSV blank lines

* unit-test case
2023-01-01 16:49:14 -05:00
John Kerl
b518bf0fe5
mlr unspace verb (#1167)
* mlr unspace verb

* unit tests

* unit tests

* lint
2023-01-01 16:44:06 -05:00
John Kerl
7bf358e497
Fix #1102 (#1163) 2022-12-29 14:30:47 -05:00
John Kerl
a55e78c45a
Fix #1146 (#1157)
* Fix #1146

* added a doc link

* update unit-test case
2022-12-29 13:58:50 -05:00
John Kerl
472223c609
Fix typo in mlr put documentation (#1140)
* Fix typo

* Build artifacts from previous commit
2022-12-05 14:28:51 -05:00
Jakub Wilk
636ca8873d
Fix typos (#1135)
Co-authored-by: John Kerl <kerl.john.r@gmail.com>
2022-11-30 09:27:42 -05:00
John Kerl
6f22401d53
Exclude median from summary default (#1131) 2022-11-26 10:34:28 -05:00
John Kerl
39286923dc
Don't double-quote a CSV field only for having a leading space (#1101)
* Don't double-quote a CSV field only for having a leading space

* unit-test case
2022-10-03 22:40:16 -04:00
John Kerl
f131087713
Check -- terminator on --mfrom (#1098) 2022-09-28 00:30:05 -04:00
John Kerl
63db1a9059
mlr reshape multiple regex via multiple -r (#1091) 2022-09-05 22:05:54 -04:00
John Kerl
4a53a6b278
Fix labels for mlr histogram --auto (#1089) 2022-09-03 09:55:44 -04:00
John Kerl
87faddd661
Continue #1086 (#1087) 2022-08-24 22:36:23 -04:00
Stephen Kitt
cdbe8b82ef
Account for varying mlr locations (#1086)
The expected error output for the "not-a-valid-timezone" test assumes
that mlr is invoked as mlr. Use "${MLR}" instead to cope with any
invocation path.

This also adds a regression test to catch future instances before they
get merged.

Signed-off-by: Stephen Kitt <steve@sk2.org>

Signed-off-by: Stephen Kitt <steve@sk2.org>
2022-08-23 14:56:47 -04:00
John Kerl
a8cc3032dc
Restore the --jvquoteall flag (#1083)
* Restore --jvquoteall flag

* make dev: for doc-build artifacts

* unit-test file
2022-08-22 09:36:58 -04:00
John Kerl
2090d0ff5a unit-test case 2022-08-22 09:18:16 -04:00
John Kerl
dafec6dc09
mlr cat --filename / --filenum (#1080)
* mlr cat --filename / --filenum

* codespell
2022-08-20 08:42:15 -04:00
John Kerl
c1a1589174
Support simplified sort-map-by-value in the DSL (#1069)
* add shorthands for sorting maps by value

* unit-test files

* on-line help content
2022-08-07 00:31:08 -04:00
John Kerl
a64133250c
Fix natsort of empty strings; support mlr sort -rt same as -tr (#1068)
* mlr sort -rt == mlrt sort -tr

* fix natsort of empty strings
2022-08-06 23:10:09 -04:00
John Kerl
9b56162c96
Make PPRINT empty-string markers readable as such (#1059) 2022-07-17 00:07:12 -04:00
John Kerl
8bca869b68 update null_count for use in stats1 2022-07-12 01:27:04 -04:00
John Kerl
64b3cbfcfe
mlr summary verb (#1056)
* mlr summary verb

* doc content

* iterating on more summarizers; needs work as noted in the PR

* mlr summary with selectable accumulators

* code-review feedback

* iterating on transposed output

* extend unit-test cases

* doc extensions
2022-07-12 00:57:34 -04:00
John Kerl
6b32e1f419
Reduce number of os.Exit callsites, part 1 of n (#1055)
* neaten some uses of os.Exit

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating

* iterating
2022-07-09 18:53:24 -04:00
John Kerl
23aefb5646
Fix issue 1032 (#1048)
* Fix issue 1032

* test files
2022-07-04 16:07:12 -04:00
John Kerl
52ce2473fb
Fix issue 1037 (#1047)
* Fix issue 1037

* test files
2022-07-04 15:40:42 -04:00
John Kerl
e91d19de25 typofix 2022-05-14 14:47:14 -04:00
John Kerl
18a6977749
Fix ASCII vs UTF-8 in TSV writer (#1023)
* Fix ASCII vs UTF-8 in TSV writer

* regression-test case
2022-05-02 20:52:34 -04:00
John Kerl
d50f22924a
Allow x ** - y and x ** + y in the DSL grammar (#1021)
* Allow x ** - y in the DSL grammar

* Parser-generator artifacts

* AST-builder support

* regression-test cases

* comments
2022-05-02 01:03:24 -04:00
John Kerl
2e727829c4
Accept + in exponent of scientific-notation floating-point DSL literals (#1020)
* Accept + in scientific-notation floating-point DSL literals

* Parser-generator artifacts; unit-test update; go mod update
2022-05-01 23:39:03 -04:00
John Kerl
d03ef16cfc
Add line/column info for DSL runtime non-parse failures (#998)
* Add line/column info for DSL runtime non-parse failures

* Other related callsites

* test cases

* Update already-existing test cases
2022-03-20 21:57:11 -04:00
John Kerl
2408915160
DSL functions and verbs for UTF-8 <-> Latin-1 (#997)
* latin1_to_utf8 and utf8_to_latin1 DSL functions

* doc-build artifacts for previous commit

* Test cases for latin1_to_utf8 and utf8_to_latin1

* extend on-line help

* latin1_to_utf8 and utf8_to_latin1 verbs

* unit-test cases for verbs

* Keep with kebab-case naming convention for verbs

* webdocs
2022-03-20 17:29:40 -04:00
John Kerl
f9e3256367
gssub DSL function (#989)
* gssub DSL function

* build artifacts for gssub source-code change

* unit-test files

* gssub / Latin 1 example in docs

* code-dedupe ssub and gssub
2022-03-18 23:48:27 -04:00
John Kerl
42a39a86ac
Use fixed OFMT for multi-platform regression-testing (#988)
* Use fixed OFMT for multi-platform regression-testing

* Update regression tests to use fixed OFMT
2022-03-16 14:44:42 -04:00
John Kerl
8f04d7671d
Restore --tsvlite (#984)
* Restore --tsvlite flag

* todo

* doc-build artifacts

* doc note on --tsv vs --tsvlite and backslashed data
2022-03-15 09:01:20 -04:00
John Kerl
47ef5de0bb
Let dhms2sec accept input like "8h" (#983)
* Let dhms2sec accept input like "8h"

* Regression-test cases
2022-03-14 23:47:50 -04:00
John Kerl
3aebb68ad6 test cases and doc-build artifacts 2022-02-24 09:57:34 -05:00
John Kerl
9b806f9561
Add --left-keep-fields option for mlr join (#967)
* Add --left-keep-fields option for mlr join

* on-line help for mlr join --lk

* doc-build artifacts

* test cases
2022-02-23 23:32:19 -05:00