From 1770c2978df9c1fc43091d8f84ba048ce9880058 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 25 Oct 2023 15:42:37 -0400 Subject: [PATCH] dl opt sc --- configs/scripts/deadline-read-options | 44 +++++++++++++++++++++++++++ configs/ssh/config | 8 ++--- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 configs/scripts/deadline-read-options diff --git a/configs/scripts/deadline-read-options b/configs/scripts/deadline-read-options new file mode 100644 index 0000000..717d296 --- /dev/null +++ b/configs/scripts/deadline-read-options @@ -0,0 +1,44 @@ +#! /usr/bin/env python +import argparse +import sys +import configparser + + +def main() -> int: + # Handle program arguments + ap = argparse.ArgumentParser( + description="Nicely lists the options stored in a Deadline .options file" + ) + ap.add_argument("options_file", type=str, help="The .options file to read") + ap.add_argument( + "--show-types", action="store_true", help="Show the type of each option" + ) + ap.add_argument( + "--show-defaults", + action="store_true", + help="Show the default value of each option", + ) + args = ap.parse_args() + + # Read the file + with open(args.options_file, "r") as f: + config_string = f.read() + + # Parse the file + config = configparser.ConfigParser() + config.read_string(config_string) + + # List each option + for section in config.sections(): + print(f"{section}{'*' if bool(config[section].get('Required', False)) else ''}: {config[section].get('Description', 'No description')}") + if args.show_types: + print(f" Type: {config[section].get('Type', 'No type')}") + if args.show_defaults: + print(f" Default: {config[section].get('Default', 'No default')}") + + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/configs/ssh/config b/configs/ssh/config index b005789..879f16b 100644 --- a/configs/ssh/config +++ b/configs/ssh/config @@ -16,11 +16,11 @@ Host github.com gist.github.com # IdentityFile %d/.ssh/id_rsa # Home network -Host unifi - HostName DreamMachinePro.local +Host unifi + HostName dreammachinepro.local User root - PreferredAuthentications password - PubkeyAuthentication no + #PreferredAuthentications password + # PubkeyAuthentication no Host ewpratten-steamdeck HostName ewpratten-steamdeck.local