improvements

This commit is contained in:
2022-12-11 12:17:15 +06:00
parent 2b7a21342b
commit ea801e6e0d
2 changed files with 25 additions and 7 deletions

View File

@@ -31,14 +31,8 @@ class EnableArgsParser(
.transformValues(5) { it.joinToString(" ") }
.help("Krontab in format * * * * *. See https://bookstack.inmo.dev/books/krontab/page/string-format")
val board by option("-b", "--board")
.default("safebooru")
.convert { ChatSettings.BoardSerializer.types.getValue(it) }
.run {
if (onlyQueryIsRequired) {
this
} else {
required()
}
}
.help("Board type. Possible values: ${ChatSettings.BoardSerializer.types.keys.joinToString { it }}")
val gallery by option("-g", "--gallery")
.flag(default = base.gallery)