From cdedcf11e229334b319e18bf68b2e07dbfafff5f Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 29 Dec 2015 15:03:43 -0500 Subject: [PATCH] mlr --csv --rs lf emphasis --- README.md | 2 +- c/cli/mlrcli.c | 4 ++++ c/todo.txt | 2 +- doc/content-for-faq.html | 6 ++++++ doc/content-for-file-formats.html | 7 ++++++- doc/content-for-release-docs.html | 7 +++---- doc/faq.html | 7 +++++++ doc/file-formats.html | 7 ++++++- doc/index-snippet-2.txt | 2 +- doc/index.html | 2 +- doc/mlr.1.premade | 3 +++ doc/reference.html | 3 +++ doc/release-docs.html | 9 ++++----- 13 files changed, 46 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c3fe22c0a..6b54362c9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ indices. Examples: ``` % mlr --csv cut -f hostname,uptime mydata.csv -% mlr --csv filter '$status != "down" && $upsec >= 10000' *.csv +% mlr --csv --rs lf filter '$status != "down" && $upsec >= 10000' *.csv % mlr --nidx put '$sum = $7 + 2.1*$8' *.dat % grep -v '^#' /etc/group | mlr --ifs : --nidx --opprint label group,pass,gid,member then sort -f group % mlr join -j account_id -f accounts.dat then group-by account_name balances.dat diff --git a/c/cli/mlrcli.c b/c/cli/mlrcli.c index 9f442f26f..ad01cd78e 100644 --- a/c/cli/mlrcli.c +++ b/c/cli/mlrcli.c @@ -304,8 +304,12 @@ static void main_usage_data_format_options(FILE* o, char* argv0) { fprintf(o, " The --right option right-justifies all fields for PPRINT output format.\n"); fprintf(o, " The --xvright option right-justifies values for XTAB format.\n"); fprintf(o, " -p is a keystroke-saver for --nidx --fs space --repifs\n"); + fprintf(o, "\n"); fprintf(o, " Examples: --csv for CSV-formatted input and output; --idkvp --opprint for\n"); fprintf(o, " DKVP-formatted input and pretty-printed output.\n"); + fprintf(o, "\n"); + fprintf(o, " Please use \"%s --csv --rs lf\" for for native Un*x (linefeed-terminated) CSV files.\n", + argv0); } static void main_usage_compressed_data_options(FILE* o, char* argv0) { diff --git a/c/todo.txt b/c/todo.txt index 112f14ffb..e6ace11c5 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -18,7 +18,7 @@ TOP OF LIST * rename mlr_selected_values_from_record to mlr_reference_selected_values_from_record ! --rs lf splatters - termcvt flins & rework that page -* link to release notes from release-docs page + * light edit on utf8 page * --mmap/--no-mmap @ mlr -h * debian screenshot diff --git a/doc/content-for-faq.html b/doc/content-for-faq.html index 6b3d52631..37602eb00 100644 --- a/doc/content-for-faq.html +++ b/doc/content-for-faq.html @@ -1,5 +1,11 @@ POKI_PUT_TOC_HERE +

Number one FAQ

+ + +Please use mlr --csv --rs lf for native Un*x (linefeed-terminated) CSV files. + +

No output at all

Check the line-terminators of the data, e.g. with the command-line diff --git a/doc/content-for-file-formats.html b/doc/content-for-file-formats.html index 332033c2e..1bfdba505 100644 --- a/doc/content-for-file-formats.html +++ b/doc/content-for-file-formats.html @@ -87,7 +87,12 @@ POKI_PUT_LINK_FOR_PAGE(reference.html)HERE.)

Miller’s --csv flag supports RFC-4180 CSV ( https://tools.ietf.org/html/rfc4180). This includes CRLF line-terminators by default, regardless -of platform. You can use mlr --csv --rs lf for native Un*x (LF-terminated) CSV files. +of platform. + +

+ +Please use mlr --csv --rs lf for native Un*x (linefeed-terminated) CSV files. +

The RFC says, somewhat briefly, that “there may be a header line”. Miller’s --implicit-csv-header option allows you to diff --git a/doc/content-for-release-docs.html b/doc/content-for-release-docs.html index 385915006..090197f9c 100644 --- a/doc/content-for-release-docs.html +++ b/doc/content-for-release-docs.html @@ -1,12 +1,11 @@

-These are full docsets as of the specified release. -Please see +For release notes per se — what changed from one release to the next — please see the following:

https://github.com/johnkerl/miller/tags -

-for release notes per se — what changed from one release to the next.

+The following are full docsets as of the specified release: +