-progress cli param for bars
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"gitbase.de/apairon/mark2web/pkg/filter"
|
||||
"gitbase.de/apairon/mark2web/pkg/logger"
|
||||
"gitbase.de/apairon/mark2web/pkg/mark2web"
|
||||
"gitbase.de/apairon/mark2web/pkg/progress"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -26,6 +27,7 @@ func main() {
|
||||
createOutDir := flag.Bool("create", false, "create output directory if not existing")
|
||||
//clearOutDir := flag.Bool("clear", false, "clear output directory before generating website")
|
||||
logLevel := flag.String("logLevel", "notice", "log level: debug, info, notice, warning, error")
|
||||
progressBars := flag.Bool("progress", false, "show progress bars for jobs")
|
||||
version := flag.Bool("version", false, "print version of this executable")
|
||||
|
||||
flag.Parse()
|
||||
@@ -43,6 +45,10 @@ func main() {
|
||||
}
|
||||
logger.SetLogLevel(level)
|
||||
|
||||
if progressBars != nil && *progressBars {
|
||||
progress.Init()
|
||||
}
|
||||
|
||||
if inDir == nil || *inDir == "" {
|
||||
logger.Log.Panic("input directory not specified")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user