From: Robert Kessl Date: Tue, 5 Aug 2014 07:00:31 +0000 (+0200) Subject: tableprinter: manpage is now installed into /usr/share/man/man1 X-Git-Tag: v6.1~3^2~8 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=0053f1a862cd0c2f359a4d12f0fdd35b17d18906;p=libucw.git tableprinter: manpage is now installed into /usr/share/man/man1 --- diff --git a/ucw/doc/Makefile b/ucw/doc/Makefile index fc38637e..0795b84b 100644 --- a/ucw/doc/Makefile +++ b/ucw/doc/Makefile @@ -6,6 +6,12 @@ UCW_DOCS=basics log fastbuf index config configure install basecode hash docsys UCW_INDEX=$(o)/ucw/doc/def_index.html UCW_DOCS_HTML=$(addprefix $(o)/ucw/doc/,$(addsuffix .html,$(UCW_DOCS))) +UCW_SRC_MANPAGES=ucw-tableprinter +UCW_MANPAGES=$(addprefix $(o)/ucw/doc/,$(addsuffix .1,$(UCW_SRC_MANPAGES))) + +$(o)/ucw/doc/ucw-tableprinter.1: ucw/doc/ucw-tableprinter.txt + a2x -f manpage -D $(o)/ucw/doc/ $< + $(UCW_INDEX): DOC_HEAD=$(s)/ucw/doc/def_index.txt $(UCW_INDEX): DOC_LIST=$(patsubst %,$(o)/ucw/doc/%.deflist,$(UCW_DOCS)) $(UCW_INDEX) $(UCW_DOCS_HTML): DOC_MODULE=ucw @@ -19,6 +25,8 @@ INSTALL_TARGETS+=install-libucw-docs endif .PHONY: install-libucw-docs -install-libucw-docs: $(UCW_INDEX) $(UCW_DOCS_HTML) +install-libucw-docs: $(UCW_INDEX) $(UCW_DOCS_HTML) $(UCW_MANPAGES) install -d -m 755 $(DESTDIR)$(INSTALL_DOC_DIR)/ucw/ install -m 644 $^ $(DESTDIR)$(INSTALL_DOC_DIR)/ucw/ + install -d -m 755 $(DESTDIR)$(INSTALL_MAN_DIR)/man1 + install -m 644 $(UCW_MANPAGES) $(DESTDIR)$(INSTALL_MAN_DIR)/man1 \ No newline at end of file diff --git a/ucw/doc/table-user.txt b/ucw/doc/table-user.txt deleted file mode 100644 index 4f9b64a0..00000000 --- a/ucw/doc/table-user.txt +++ /dev/null @@ -1,81 +0,0 @@ -UCW-TABLEPRINTER(1) -=================== - -NAME ----- - -ucw-tableprinter - UCW table printer is a program module that allows user-customized printing of tables. - -DESCRIPTION ------------ - -The table printer module provides formatting of 2-dimensional tables -in various ways. - -Each table print-out consists of a number of rows, which are processed -one after another. All rows have the same number of columns. Once a -table is defined, it can be printed using a variety of formatters -(block-line, human-readable, machine-readable, etc.). - -The table definition consists of various column definitions, each -column definition is a pair consisting of a name and a type. Name of -each column must be unique in the whole table. Each column definition -can be instantiated(printed) in its own format, e.g., a size column -can be printed three-times: 1) in bytes; 2) in gigabytes; 3) -human-readable. - -The table can be controlled using various options: - -[options="header"] -|=============================================================================================================== -| option | argument | meaning -| `header` | 0 or 1 | set whether a table header should be printed -| `noheader` | 'none' | equivalent to `header`=0 -| `cols` | comma-separated column list | set order of columns -| `fmt` | `human`/`machine`/`block` | set table formatter to one of the built-in formatters -| `col-delim` | string | set column delimiter -| `cells` | string | set column cell format mode, possibilities are: default, raw, pretty -| `raw` | 'none' | set column cell format to raw data, equivalent to cells:raw -| `pretty` | 'none' | set column cell format to pretty-printing, equivalent to cells:pretty -|=============================================================================================================== - -Column order (`cols` option) has the following format: - - := [,]* - - := [ '[' ']' ] - - is a string that does not contain comma ',' or '[',']' brackets - - := [ ',' ] - -Where is a comma-separated list of options - -Column delimiter option (`col-delim`) can be an arbitrary string. The -cell format option `cells` can have one of the possible three values: -1) `pretty`, 2) `default`, 3) `raw`. The `raw` and `pretty` value of -`cells` option can be shortcutted as options `raw` and `pretty` with -no value. - -Additionally to standart types (like integer, floating point) there -are the two following types: 1) size; 2) timestamp. The 'size' type -has the following case-sensitive column options: `KB`, `MB`, `GB`, -`TB`, `auto`, e.g., a column of type size and name `file-size` can be -specified as `file-size[MB]` or `file-size[auto]`. The 'timestamp' -has the following case-sensitive column options: 1) `datetime` which -corresponds to date(1) format "%F %T", 2) `timestamp` which -corresponds to a number of seconds relative to start of some epoch. - -Description of table formats ------------------------------ - -'human-readable': prints columns separated by single space, rows -separated by newline '\n'. - -'block-line': prints each column on one line, i.e., the column -separator is '\n', rows are separated by double newlines -'\n\n'. Therefore, rows forms newline separated blocks of rows. - -'machine-readable': prints columns separated by a tabulator '\t', rows -separated by '\n'. - diff --git a/ucw/doc/ucw-tableprinter.txt b/ucw/doc/ucw-tableprinter.txt new file mode 100644 index 00000000..d8c0165a --- /dev/null +++ b/ucw/doc/ucw-tableprinter.txt @@ -0,0 +1,81 @@ +UCW-TABLEPRINTER(1) +=================== + +NAME +---- + +ucw-tableprinter - UCW table printer is a program module that allows user-customized printing of tables. + +DESCRIPTION +----------- + +The table printer module provides formatting of 2-dimensional tables +in various ways. + +Each table print-out consists of a number of rows, which are processed +one after another. All rows have the same number of columns. Once a +table is defined, it can be printed using a variety of formatters +(block-line, human-readable, machine-readable, etc.). + +The table definition consists of various column definitions, each +column definition is a pair consisting of a name and a type. Name of +each column must be unique in the whole table. Each column definition +can be instantiated(printed) in its own format, e.g., a size column +can be printed three-times: 1) in bytes; 2) in gigabytes; 3) +human-readable. + +The table can be controlled using various options: + +[options="header"] +|=============================================================================================================== +| option | argument | meaning +| `header` | 0 or 1 | set whether a table header should be printed +| `noheader` | 'none' | equivalent to `header`=0 +| `cols` | comma-separated column list | set order of columns +| `fmt` | `human`/`machine`/`block` | set table formatter to one of the built-in formatters +| `col-delim` | string | set column delimiter +| `cells` | string | set column cell format mode, possibilities are: default, raw, pretty +| `raw` | 'none' | set column cell format to raw data, equivalent to cells:raw +| `pretty` | 'none' | set column cell format to pretty-printing, equivalent to cells:pretty +|=============================================================================================================== + +Column order (`cols` option) has the following format: + + := [,]* + + := [ '[' ']' ] + + is a string that does not contain comma ',' or '[',']' brackets + + := [ ',' ] + +Where is a comma-separated list of options. + +Column delimiter option (`col-delim`) can be an arbitrary string. The +cell format option `cells` can have one of the possible three values: +1) `pretty`, 2) `default`, 3) `raw`. The `raw` and `pretty` value of +`cells` option can be shortcutted as options `raw` and `pretty` with +no value. + +Additionally to standart types (like integer, floating point) there +are the two following types: 1) size; 2) timestamp. The 'size' type +has the following case-sensitive column options: `KB`, `MB`, `GB`, +`TB`, `auto`, e.g., a column of type size and name `file-size` can be +specified as `file-size[MB]` or `file-size[auto]`. The 'timestamp' +has the following case-sensitive column options: 1) `datetime` which +corresponds to date(1) format "%F %T", 2) `timestamp` which +corresponds to a number of seconds relative to start of some epoch. + +Description of table formats +----------------------------- + +'human-readable': prints columns separated by single space, rows +separated by newline '\n'. + +'block-line': prints each column on one line, i.e., the column +separator is '\n', rows are separated by double newlines +'\n\n'. Therefore, rows forms newline separated blocks of rows. + +'machine-readable': prints columns separated by a tabulator '\t', rows +separated by '\n'. +