-progress cli param for bars

This commit is contained in:
Sebastian Frank
2019-03-25 14:01:28 +01:00
parent 740fb94556
commit 267d1010bb
12 changed files with 166 additions and 38 deletions

View File

@@ -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")
}