mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 04:30:56 +01:00
add template output mode
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
Version = "v1.5.11"
|
||||
Version = "v1.5.12"
|
||||
MAXPARTS = 2
|
||||
)
|
||||
|
||||
@@ -95,6 +95,7 @@ type Config struct {
|
||||
InputJSON bool
|
||||
AutoHeaders bool
|
||||
CustomHeaders []string
|
||||
Template string
|
||||
|
||||
SortMode string
|
||||
SortDescending bool
|
||||
@@ -142,6 +143,7 @@ type Modeflag struct {
|
||||
A bool
|
||||
C bool
|
||||
J bool
|
||||
P bool // template
|
||||
}
|
||||
|
||||
// used for switching printers
|
||||
@@ -154,6 +156,7 @@ const (
|
||||
CSV
|
||||
ASCII
|
||||
Json
|
||||
Template
|
||||
)
|
||||
|
||||
// various sort types
|
||||
@@ -294,6 +297,8 @@ func (conf *Config) PrepareModeFlags(flag Modeflag) {
|
||||
conf.OutputMode = CSV
|
||||
case flag.J:
|
||||
conf.OutputMode = Json
|
||||
case conf.Template != "":
|
||||
conf.OutputMode = Template
|
||||
default:
|
||||
conf.OutputMode = ASCII
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user