Пример #1
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(
        parents=[parent], description='Split files into small chunks')

    help = "The target file to be split"
    parser.add_argument('target', type=str, help=help)

    help = "Output destination. Defaults to cwd."
    parser.add_argument('--dest',
                        '-d',
                        type=str,
                        help=help,
                        default=os.getcwd())

    help = "Number of splits. Defaults to 2."
    parser.add_argument('--num', '-n', type=int, help=help, default=2)

    help = "Use for creating tar of each split. Defaults to False"
    parser.add_argument('--tar', '-t', action='store_true', help=help)

    args = parser.parse_args()

    return args
Пример #2
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(parents=[parent], description='Remove signs from signed python files easily')

    rsign_group = parser.add_argument_group('rsign')

    help = "The target for sign removal."
    rsign_group.add_argument('target', type=str, help=help)

    args = parser.parse_args()

    return args
Пример #3
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(parents=[parent], description='Split files into small chunks')

    help = "The target directory to be joined"
    parser.add_argument('target', type=str, help=help)

    help = "Output destination. Defaults to None."
    parser.add_argument('--dest', '-d', type=str, help=help, default='')

    args = parser.parse_args()

    return args
Пример #4
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(
        parents=[parent], description='Split files into small chunks')

    help = "The target directory to be joined"
    parser.add_argument('target', type=str, help=help)

    help = "Output destination. Defaults to None."
    parser.add_argument('--dest', '-d', type=str, help=help, default='')

    args = parser.parse_args()

    return args
Пример #5
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(parents=[parent], description='Sign python files quickly')

    sign_group = parser.add_argument_group('sign')

    help = "The location of the signature template."
    sign_group.add_argument('signfile', type=str, help=help)

    help = "The target to be signed with the template."
    sign_group.add_argument('target', type=str, help=help)

    help = "If signature of signed files should be replaced. Defaults to False"
    sign_group.add_argument('--force', '-f',  action='store_true', help=help, dest='force')

    args = parser.parse_args()

    return args
Пример #6
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(parents=[parent], description='Split files into small chunks')

    help = "The target file to be split"
    parser.add_argument('target', type=str, help=help)

    help = "Output destination. Defaults to cwd."
    parser.add_argument('--dest', '-d', type=str, help=help, default=os.getcwd())

    help = "Number of splits. Defaults to 2."
    parser.add_argument('--num', '-n', type=int, help=help, default=2)

    help = "Use for creating tar of each split. Defaults to False"
    parser.add_argument('--tar', '-t', action='store_true', help=help)

    args = parser.parse_args()

    return args
Пример #7
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(
        parents=[parent], description='Statistics utility of autosign')

    exclusive = parser.add_mutually_exclusive_group()

    help = "The target on which data should be collected"
    parser.add_argument('target', type=str, help=help)

    help = "Complete Statistics"
    exclusive.add_argument('--complete',
                           '-c',
                           action='store_true',
                           help=help,
                           dest='complete')

    help = "Count The signed files"
    exclusive.add_argument('--sign',
                           '-s',
                           action='store_true',
                           help=help,
                           dest='sign')

    help = "Count The unsigned files"
    exclusive.add_argument('--usign',
                           '-u',
                           action='store_true',
                           help=help,
                           dest='usign')

    args = parser.parse_args()

    return args
Пример #8
0
def parse_args():
    """
    Parses the arguments
    """
    parent = parent_parser.gen_parent_parser()
    parser = argparse.ArgumentParser(parents=[parent], description='Statistics utility of autosign')

    exclusive = parser.add_mutually_exclusive_group()

    help = "The target on which data should be collected"
    parser.add_argument('target', type=str, help=help)

    help = "Complete Statistics"
    exclusive.add_argument('--complete', '-c',  action='store_true', help=help, dest='complete')

    help = "Count The signed files"
    exclusive.add_argument('--sign', '-s',  action='store_true', help=help, dest='sign')

    help = "Count The unsigned files"
    exclusive.add_argument('--usign', '-u',  action='store_true', help=help, dest='usign')

    args = parser.parse_args()

    return args