How to use the fritzconnection.cli.utils.print_header function in fritzconnection

To help you get started, we’ve selected a few fritzconnection examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kbr / fritzconnection / fritzconnection / cli / fritzwlan.py View on Github external
def main():
    args = get_cli_arguments(add_arguments)
    if not args.password:
        print('Exit: password required.')
    else:
        fw = get_instance(FritzWLAN, args)
        print_header(fw)
        report_devices(fw, args)
github kbr / fritzconnection / fritzconnection / cli / fritzphonebook.py View on Github external
def main():
    args = get_cli_arguments(add_arguments)
    if not args.password:
        print('Exit: password required.')
        return
    fpb = get_instance(FritzPhonebook, args)
    print_header(fpb)
    print('FritzPhonebook:\n')
    if args.all:
        print_phonebooks(fpb)
    elif args.name:
        print_search_name(fpb, args)
    elif args.number:
        print_search_number(fpb, args)
    print()  # blank line for better readability
github kbr / fritzconnection / fritzconnection / cli / fritzinspection.py View on Github external
def run_inspector(inspector, args):
    print_header(inspector.fc)
    if args.services:
        inspector.view_servicenames()
    elif args.serviceactions:
        inspector.view_actionnames(args.serviceactions[0])
    elif args.servicearguments:
        inspector.view_actionnames(args.servicearguments[0], view_arguments=True)
    elif args.actionarguments:
        inspector.view_actionarguments(args.actionarguments[0],
                                       args.actionarguments[1])
    elif args.complete:
        inspector.view_complete_api()
    elif args.reconnect:
        inspector.fc.reconnect()
        print('reconnect the router.')
    print()
github kbr / fritzconnection / fritzconnection / cli / fritzstatus.py View on Github external
def main():
    args = get_cli_arguments()
    if not args.password:
        print('Exit: password required.')
    else:
        fs = get_instance(FritzStatus, args)
        print_header(fs)
        print_status(fs)
github kbr / fritzconnection / fritzconnection / cli / fritzcall.py View on Github external
def main():
    arguments = get_cli_arguments(add_arguments)
    if not arguments.password:
        print('Exit: password required.')
        return
    fc = get_instance(FritzCall, arguments)
    if arguments.call:
        dial_number(fc, arguments.call)
    else:
        print_header(fc)
        report_calls(fc, arguments)
github kbr / fritzconnection / fritzconnection / cli / fritzhosts.py View on Github external
def main():
    args = get_cli_arguments()
    if not args.password:
        print('Exit: password required.')
    else:
        fh = get_instance(FritzHosts, args)
        print_header(fh)
        print_status(fh)