mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 04:30:56 +01:00
add -k<name> and sort by multiple columns support, fixes #34
This commit is contained in:
@@ -33,15 +33,17 @@ import (
|
||||
)
|
||||
|
||||
func printData(writer io.Writer, conf cfg.Config, data *Tabdata) {
|
||||
// add numbers to headers and remove this we're not interested in
|
||||
// Sort the data first, before headers+entries are being
|
||||
// reduced. That way the user can specify any valid column to sort
|
||||
// by, independently if it's being used for display or not.
|
||||
sortTable(conf, data)
|
||||
|
||||
// add numbers to headers and remove those we're not interested in
|
||||
numberizeAndReduceHeaders(conf, data)
|
||||
|
||||
// remove unwanted columns, if any
|
||||
reduceColumns(conf, data)
|
||||
|
||||
// sort the data
|
||||
sortTable(conf, data)
|
||||
|
||||
switch conf.OutputMode {
|
||||
case cfg.Extended:
|
||||
printExtendedData(writer, conf, data)
|
||||
|
||||
Reference in New Issue
Block a user