CLI for authenticated file sharing

This commit is contained in:
Julien Chaumond
2019-12-04 00:52:23 -05:00
parent 7edb51f3a5
commit e4fbf3e2cc
6 changed files with 413 additions and 0 deletions

23
transformers-cli Normal file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python
from argparse import ArgumentParser
from transformers.commands.user import UserCommands
if __name__ == '__main__':
parser = ArgumentParser(description='Transformers CLI tool', usage='transformers-cli <command> [<args>]')
commands_parser = parser.add_subparsers(help='transformers-cli command helpers')
# Register commands
UserCommands.register_subcommand(commands_parser)
# Let's go
args = parser.parse_args()
if not hasattr(args, 'func'):
parser.print_help()
exit(1)
# Run
service = args.func(args)
service.run()