summaryrefslogtreecommitdiffstats
path: root/libsmartcols/docs
Commit message (Collapse)AuthorAgeFilesLines
* libsmartcols: cleanup and extend padding functionalityKarel Zak2019-07-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LIBSMARTCOLS_DEBUG_PADDING=on in the next examples forces libsmartcols print '.' as a padding char. See line "ffff" in the exmaples. * default output is to fill all except last cell $ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null NAME.. ......NUM STRINGS STRINGS aaaa.. ........0 aaaa... aaaa bbb... ......100 bbb.... bbb ccccc. .......21 ccccc.. ccccc dddddd ........3 dddddd. dddddd ee.... ......411 ee..... ee ffff.. .....5111 ....... gggggg 678993321 gggggg. gggggg hhh... ..7666666 hhh.... hhh * scols_table_enable_minout() minimizes output for tailing empty cells, example: $ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --minout --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null NAME.. ......NUM STRINGS STRINGS aaaa.. ........0 aaaa... aaaa bbb... ......100 bbb.... bbb ccccc. .......21 ccccc.. ccccc dddddd ........3 dddddd. dddddd ee.... ......411 ee..... ee ffff.. .....5111 gggggg 678993321 gggggg. gggggg hhh... ..7666666 hhh.... hhh * cleanup up scols_table_enable_maxout() use, example: $ LIBSMARTCOLS_DEBUG_PADDING=on ./sample-scols-fromfile --nlines 10 --maxout --width 80 --column tests/ts/libsmartcols/files/col-name --column tests/ts/libsmartcols/files/col-number --column tests/ts/libsmartcols/files/col-string --column tests/ts/libsmartcols/files/col-string tests/ts/libsmartcols/files/data-string tests/ts/libsmartcols/files/data-number tests/ts/libsmartcols/files/data-string-empty tests/ts/libsmartcols/files/data-string-empty 2> /dev/null NAME.............. ..................NUM STRINGS............ STRINGS............ aaaa.............. ....................0 aaaa............... aaaa............... bbb............... ..................100 bbb................ bbb................ ccccc............. ...................21 ccccc.............. ccccc.............. dddddd............ ....................3 dddddd............. dddddd............. ee................ ..................411 ee................. ee................. ffff.............. .................5111 ................... ................... gggggg............ ............678993321 gggggg............. gggggg............. hhh............... ..............7666666 hhh................ hhh................ Note that we cannot make scols_table_enable_minout() default because for example "column --table" is pretty commonly used with non-blank columns separator and in this case all cells has to be filled. $ echo -e "aa,b,ccc\na,,\naaa,bbb,ccc" | column --table --separator ',' --output-separator '|' aa |b |ccc a | | aaa|bbb|ccc Addresses: https://github.com/karelzak/util-linux/issues/826 Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix docsKarel Zak2019-06-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: (docs) add reference to v2.33 and v2.34Karel Zak2019-06-071-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add grouping API docsKarel Zak2018-12-071-0/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: improve JSON support (add types)Karel Zak2018-04-031-0/+2
| | | | | | | This commit add SCOLS_JSON_{NUMBER,STRING,BOOLEAN} to specify column type for JSON output formatting. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: (docs) update yearKarel Zak2018-03-201-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix docs warningsKarel Zak2018-02-211-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: fix typos using codespellRuediger Meier2018-02-161-1/+1
| | | | | | Some more funny typos, please review carefully. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libsmartcols: add scols_table_enable_noencoding()Karel Zak2017-07-311-0/+2
| | | | | | | | Now the library encode all output. It seems too strict and difficult to use the library for some use-cases -- for example if you want to use the library for already colorized output (by esc.sequences). Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: (docs) add new functionsKarel Zak2017-06-131-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: (docs) add missing 'since' tagsKarel Zak2017-05-231-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_line_is_ancestor()Karel Zak2017-05-051-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_sort_table_by_tree()Karel Zak2017-04-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_table_move_column()Karel Zak2017-04-071-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_cell_get_alignment()Karel Zak2017-01-091-0/+1
| | | | | | | | | | | | | Just to hide that we use cell flags (bitwise operations) to define cell content alignment. The patch also more explicitly specifies the flags in the header file. The alignment is evaluated in the order: right, center, left. The default is left. Note that SCOLS_CELL_FL_* are used for for table title only. Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: replace FTP by HTTPS in kernel.org URLsSébastien Helleu2016-12-191-1/+1
| | | | | | | The links to ftp://ftp.kernel.org/ are replaced by https://www.kernel.org/. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_column_add_width()Karel Zak2016-09-301-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: some random fixesKarel Zak2016-09-271-7/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fixes in doc generationIgor Gnatenko2016-09-271-1/+5
| | | | | | | * Add 2.29 symbols index * Sync argument names between header and implementation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: support custom wrap and remove SCOLS_FL_WRAPNLKarel Zak2016-09-261-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new API provides full control on multi-line cells, you can wrap text by new lines (build-in support) or by another way (after words, commas, etc.) Changes: * new scols_column_set_wrapfunc() sets pointers to two callback functions 1/ chunksize() - returns largest data chunk size; used when we calculate columns width 2/ nextchunk() - terminate the current chunk and returns pointer to the next; used when we print data * remove SCOLS_FL_WRAPNL and add new functions scols_wrapnl_chunksize() and scols_wrapnl_nextchunk() to provide build-in functionality to wrap cells on \n * remove scols_column_is_wrapnl() add scols_column_is_customwrap() (returns true if custom wrap functions are defined) * add scols_column_set_safechars() and scols_column_get_safechars() to allow to control output encoding, safe chars are not encoded by \xFOO * modify "fromfile" test code to use build-in scols_wrapnl_* callbacks for "wrapnl" tests * add new function scols_column_get_table() Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: (docs) add missing functionsKarel Zak2016-09-231-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: cleanup scols_table_set_symbols() APIKarel Zak2016-09-231-0/+2
| | | | | | | | | | | | Change behavior: * scols_table_set_symbols(tb, NULL) remove reference to the current symbols setting and does not set default symbols at all Add new functions: * scols_table_get_symbols() * scols_table_set_default_symbols() Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add functions to control terminal usageKarel Zak2016-09-131-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: allow to change cell padding charKarel Zak2016-09-071-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: support multi-line cells based on line breaksKarel Zak2016-09-061-0/+1
| | | | | | | | | | Now libsmartcols completely control when and how wrap long lines/cells. This is sometimes user unfriendly and it would be nice to support multi-line cells where wrap is based on \n (new line char). This patch add new column flag SCOLS_FL_WRAPNL. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: implement scols_table_print_range_to_stringIgor Gnatenko2016-02-212-1/+2
| | | | | Reference: https://github.com/karelzak/util-linux/issues/283 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* libsmartcols: support continuous printingKarel Zak2016-02-191-0/+1
| | | | | | | | | This patch allows to disable line-breaks. This feature is usable when you want to re-print the same line more than once -- move terminal cursor to the begin of the line and print again and again (aka progress bar). Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_table_print_range()Karel Zak2016-02-191-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: use libscols_cell for titleKarel Zak2016-02-091-3/+2Star
| | | | | References: https://github.com/karelzak/util-linux/issues/270 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linuxKarel Zak2016-01-251-0/+1
|\ | | | | | | | | | | | | | | * 'scols_fl_wrap' of https://github.com/ignatenkobrain/util-linux: libsmartcols: add scols_column_is_wrap to docs libsmartcols: don't loose colors when wrapping libsmartcols: wrap columns correctly with unicode libsmartcols: implement SCOLS_FL_WRAP
| * libsmartcols: add scols_column_is_wrap to docsIgor Gnatenko2016-01-221-0/+1
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: document v2.27 symbolsKarel Zak2016-01-251-0/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: add 'Since' tag for gtkdoc for some functionsIgor Gnatenko2016-01-251-0/+4
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: add few methods to get information about titleIgor Gnatenko2016-01-251-0/+3
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | libsmartcols: support multibyte titles, rename wrap to paddingKarel Zak2016-01-221-1/+1
| | | | | | | | | | | | | | | | | | - let's support multibyte table titles - use lib/mbalign.c to align the title - rename title_wrap to title_padding (we already use "wrap" on another places for another things) Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: add new functions to docsKarel Zak2016-01-221-0/+2
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: allow to set data by reference to libscols_columnKarel Zak2016-01-121-0/+2
| | | | | References: https://github.com/karelzak/util-linux/issues/251 Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add SCOLS_FL_HIDDENKarel Zak2015-12-101-0/+1
| | | | | | Export "don't print this column" functionality by public API. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_table_enable_nowrap()Karel Zak2015-12-071-0/+1
| | | | | | | This allows to use libsmartcols in ncurses programs without any additional voodoo. Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add JSON output formatKarel Zak2015-06-041-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix gtk-docs related warningsKarel Zak2015-05-281-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update API docs yearsKarel Zak2015-01-131-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: fix docs namespaceKarel Zak2014-11-261-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: rename libs xml/version.xml to xml/version-utils.xmlKarel Zak2014-06-032-2/+2
| | | | | | | It seems that gtk-docs stuff is confused when we use version.xml (package version) and xml/version.xml (library version functions). Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add scols_sort_table()Karel Zak2014-05-201-0/+6
| | | | | | | | | | | | | | | | | | | * add pointer to column cmp() function [scols_column_set_cmpfunc()] * allow to store per-cell application private data (to make it possible to sort tables on data independent on cell output data) [scols_cell_set_userdata() ...] * make it possible to access line cell by column [scols_line_get_column_cell()] Sort and cmp() stuff based on patches from Shakur Shams Mullick. Co-Author: Shakur Shams Mullick <shakursmullick@gmail.com> Signed-off-by: Shakur Shams Mullick <shakursmullick@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: (docs) reorder functions in version sectionKarel Zak2014-05-071-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add separator getters/settersOndrej Oprala2014-04-141-0/+4
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* libsmartcols: improve docsKarel Zak2014-04-071-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add debug and version functionsKarel Zak2014-04-071-1/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: clean up flags usageKarel Zak2014-04-031-8/+7Star
| | | | | | | | | * rename flags functions to scols_table_enable_* * rename *_no_foo() functions to _nofoo() * output formats are mutually exclusive, so don't use flags there * don't assume symbols in scols_new_table(), use scols_table_set_symbols() Signed-off-by: Karel Zak <kzak@redhat.com>