diff --git a/bta-wiki-import.exe b/bta-wiki-import.exe index 525b9e1..0fcb98f 100755 Binary files a/bta-wiki-import.exe and b/bta-wiki-import.exe differ diff --git a/cmd/root.go b/cmd/root.go index de69571..47ed9cc 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,10 +1,24 @@ package cmd import ( + "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) +var ( + flagColor bool +) + var RootCmd = &cobra.Command{ Use: "btawiki", Short: "btawiki exports data from BTA3062 game files to mediawiki", + PersistentPreRun: func(cmd *cobra.Command, _ []string) { + if flagColor { + logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) + } + }, +} + +func init() { + RootCmd.PersistentFlags().BoolVar(&flagColor, "color", false, "enable color logging") }