Esempio n. 1
0
                        help='print dot graph output')

    parser.add_argument(action='store',
                        nargs='*',
                        dest='files',
                        default=[])

    parser.add_argument('--debug',
                        action='store_true',
                        dest='debug',
                        default=False,
                        help=SUPPRESS)

    return parser.parse_args(argv[1:])


if __name__ == '__main__':
    try:
        # args = get_args(['snldump', 'scs_st.st', '--text'])
        # args = get_args(['snldump', 'scs_st.st', '--text'])
        args = get_args(sys.argv)
        if args.dot:
            args.text = False
        debug_flag = args.debug
        if debug_flag:
            print(args)
        process_file_list(args.files, process_file, args=args)
    except Exception as e:
        print(e)
        sys.exit(1)
Esempio n. 2
0
        #                  '-m', 'top', 'aom:',
        #                  '-m', 'aom', 'aom:',
        #                  '-m', 'tcs', 'tcs:',
        #                  '-m', 'rtc', 'rtc:',
        #                  '-m', 'oiwfs', 'aom:oiwfs:',
        #                  '-m', 'omstype', 'OMS 58 VME',
        #                  'data/aom/aomTop.db_orig'])
        # args = get_args(['dbmacro',
        #                  '--debug',
        #                  '-m', 'top', 'mac:',
        #                  '-m', 'mech', 'bolt:',
        #                  '-m', 'sys', 'rocket:',
        #                  '-m', 'dev', 'wing:',
        #                  'test_data/macro.db'])
        # args = get_args(['dbmacro', '--debug', '-l', 'test_data/macro.db'])

        args = get_args(sys.argv)
        debug_flag = args.debug
        if debug_flag:
            print(args)
        if args.list_flag:
            process_file_list(args.files, list_macros, args=args)
        elif args.macros:
            process_file_list(args.files, replace_macros, args=args)
        else:
            print('No macros to substitute')

    except Exception as e:
        print(e)
        sys.exit(1)
Esempio n. 3
0
    parser.add_argument('-r',
                        '--reverse',
                        action='store_true',
                        dest='reverse',
                        default=False,
                        help='reverse sort order')

    parser.add_argument(action='store', nargs='*', dest='files', default=[])

    parser.add_argument('--debug',
                        action='store_true',
                        dest='debug',
                        default=False,
                        help=SUPPRESS)

    return parser.parse_args(argv[1:])


if __name__ == '__main__':
    try:
        # args = get_args(['dbsort', 'data/diff1.db', '--debug', '--reverse'])
        args = get_args(sys.argv)
        debug_flag = args.debug
        if debug_flag:
            print(args)
        process_file_list(args.files, sort_database, args=args)
    except Exception as e:
        print(e)
        sys.exit(1)
Esempio n. 4
0
    parser.add_argument('-t',
                        '--type',
                        action='store_true',
                        dest='type',
                        default=False,
                        help='print record type')

    parser.add_argument('--debug',
                        action='store_true',
                        dest='debug',
                        default=False,
                        help=SUPPRESS)

    return parser.parse_args(argv[1:])


if __name__ == '__main__':
    try:
        # args = get_args(['dbl', 'data/diff1.db', '--type'])
        # args = get_args(['dbl', 'data/diff1.db', '--type', '--debug'])
        # args = get_args(['dbl', 'rtc/rtcUsrTop.db'])
        args = get_args(sys.argv)
        debug_flag = args.debug
        if debug_flag:
            print(args)
        process_file_list(args.files, list_records, args=args)
    except Exception as e:
        print(e)
        sys.exit(1)