From 9166b3b1ccdd2417942741e74d9fe9a0c412c44a Mon Sep 17 00:00:00 2001 From: rune Date: Tue, 7 Mar 2023 19:05:02 +0100 Subject: [PATCH] Fixed some small stuff --- ddns.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ddns.py b/ddns.py index c802ac3..e5bc1aa 100755 --- a/ddns.py +++ b/ddns.py @@ -258,7 +258,7 @@ def list_do_sub_domains(domain): remote = current.read().decode('utf-8') remoteData = json.loads(remote) print('Domains in your DigitalOcean account not in ddns DB for [b]%s[/b]' % (domain)) - print('============================================================================') + print('===================================================================') for k in remoteData["domain_records"]: if k['type'] == 'A': cursor.execute('SELECT COUNT(*) FROM subdomains WHERE id like ?',(str(k['id']),)) @@ -315,7 +315,8 @@ def show_current_info(): print('Current info.') print('==========================================') print('API key : %s' % (API)) - print('IP resolver : %s' % (ipserver)) + print('IP v4 resolver : %s' % (ipserver)) + print('IP v6 resolver : N/A') print('App version : %s (https://gitlab.pm/rune/ddns)' % (app_version)) print('Top domains : %s' % (topdomains)) print('sub domains : %s' % (subdomains)) @@ -451,7 +452,7 @@ parser.add_argument('-k', '--local', help='Add an existing DigitalOcean domain t parser.add_argument('-r', '--remove', help='Remove a subdomain from your DigitalOcean account and ddns.', required=False, nargs=1, metavar=('domain'), action='append') -parser.add_argument('-i', '--info', help='Show current config info', +parser.add_argument('-v', '--version', help='Show current version and config info', required=False, action='store_true') parser.add_argument('-p', '--ipserver', help='Set IP server lookup to use. Indicate 4 or 6 for IP type.', @@ -470,7 +471,7 @@ elif args['top']: add_domian(args['top'][0][0]) elif args['sub']: add_subdomain(args['sub'][0][0]) -elif args['info']: +elif args['version']: show_current_info() elif args['ipserver']: ip_server(args['ipserver'][0][0],args['ipserver'][0][1])