Added -l flag

This commit is contained in:
Anon 2023-04-08 17:57:50 -07:00
parent 59d80a6fc2
commit 16cdad7edf

View File

@ -221,6 +221,7 @@ def main():
parser.add_argument("-k", "--keyfile", help="Keyfile used for decryption") parser.add_argument("-k", "--keyfile", help="Keyfile used for decryption")
parser.add_argument("-i", "--index", help="Start at index (only matters if profile is set to sequential)", default=0) parser.add_argument("-i", "--index", help="Start at index (only matters if profile is set to sequential)", default=0)
parser.add_argument("-s", "--state", help="Set comma seperated state (only matters if profile is set to sequential)", default=None) parser.add_argument("-s", "--state", help="Set comma seperated state (only matters if profile is set to sequential)", default=None)
parser.add_argument("-l", "--list", help="Output profile names", action="store_true")
parser.add_argument("remainder", help=argparse.SUPPRESS, nargs=argparse.REMAINDER) parser.add_argument("remainder", help=argparse.SUPPRESS, nargs=argparse.REMAINDER)
arguments = parser.parse_args() arguments = parser.parse_args()
@ -235,6 +236,13 @@ def main():
except ImportError: except ImportError:
raise FailedToLoadCfg("Invalid config file: {}".format(arguments.config)) raise FailedToLoadCfg("Invalid config file: {}".format(arguments.config))
if arguments.list:
for x in yandere_config.settings_post:
for y in x:
print(y["name"], end=",")
print("")
return 1
# Flag if the bot is running in debug mode # Flag if the bot is running in debug mode
debug_mode = arguments.dry_run or arguments.debug debug_mode = arguments.dry_run or arguments.debug