2022-09-22 12:48:20 +02:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
var args []string
|
|
|
|
var shoulduwuify bool = true
|
|
|
|
var noascii bool = false
|
2022-09-22 14:44:27 +02:00
|
|
|
var usepng bool = false
|
2022-09-23 11:03:50 +02:00
|
|
|
var hascolor bool = true
|
2022-09-22 12:48:20 +02:00
|
|
|
|
|
|
|
func Initargs() {
|
|
|
|
args = os.Args[1:]
|
|
|
|
for _, argument := range args {
|
|
|
|
if strings.HasPrefix(argument, "--") {
|
|
|
|
switch argument {
|
|
|
|
case "--nouwu":
|
|
|
|
shoulduwuify = false
|
|
|
|
case "--noascii":
|
|
|
|
noascii = true
|
2022-09-22 14:44:27 +02:00
|
|
|
case "--usepng":
|
|
|
|
usepng = true
|
2022-09-23 11:03:50 +02:00
|
|
|
case "--nocolor":
|
|
|
|
hascolor = false
|
2022-09-22 12:48:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func Woulduwuify() bool {
|
|
|
|
return shoulduwuify
|
|
|
|
}
|
|
|
|
func Asciioverwrite(ascii []string) []string {
|
|
|
|
if noascii {
|
|
|
|
literallynothing := []string{"", ""}
|
|
|
|
return (literallynothing)
|
|
|
|
} else {
|
|
|
|
return ascii
|
|
|
|
}
|
|
|
|
}
|