Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: cms/translations/xtm/cli.py

Issue 29908581: Issue #7036 - [XTM Integration] Add support for providing workflow name (Closed)
Patch Set: Created Oct. 12, 2018, 2:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cms/translations/xtm/constants.py » ('j') | cms/translations/xtm/xtm_api.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 project_create_parser.add_argument( 98 project_create_parser.add_argument(
99 '--client-id', required=True, type=int, 99 '--client-id', required=True, type=int,
100 help=const.ArgumentsHelp.ProjectCreate.CLIENT_ID, 100 help=const.ArgumentsHelp.ProjectCreate.CLIENT_ID,
101 ) 101 )
102 project_create_parser.add_argument( 102 project_create_parser.add_argument(
103 '--ref-id', required=True, 103 '--ref-id', required=True,
104 help=const.ArgumentsHelp.ProjectCreate.REF_ID, 104 help=const.ArgumentsHelp.ProjectCreate.REF_ID,
105 ) 105 )
106 project_create_parser.add_argument( 106 project_create_parser.add_argument(
107 '--workflow-id', required=True, type=int, 107 '--workflow-id', type=int,
108 help=const.ArgumentsHelp.ProjectCreate.WORKFLOW_ID, 108 help=const.ArgumentsHelp.ProjectCreate.WORKFLOW_ID,
109 ) 109 )
110 project_create_parser.add_argument( 110 project_create_parser.add_argument(
111 '--source-lang', default='en_US', 111 '--source-lang', default='en_US',
112 help=const.ArgumentsHelp.ProjectCreate.SOURCE, 112 help=const.ArgumentsHelp.ProjectCreate.SOURCE,
113 ) 113 )
114 project_create_parser.add_argument( 114 project_create_parser.add_argument(
115 '--save-id', action='store_true', default=False, 115 '--save-id', action='store_true', default=False,
116 help=const.ArgumentsHelp.ProjectCreate.SAVE_ID, 116 help=const.ArgumentsHelp.ProjectCreate.SAVE_ID,
117 ) 117 )
118 project_create_parser.add_argument(
119 '--workflow-name',
120 help=const.ArgumentsHelp.ProjectCreate.WORKFLOW_NAME,
121 )
118 122
119 # Subparser for uploading files to project 123 # Subparser for uploading files to project
120 project_upload_parser = subparsers.add_parser( 124 project_upload_parser = subparsers.add_parser(
121 'upload', help=const.ArgumentsHelp.ProjectUpload.MAIN, 125 'upload', help=const.ArgumentsHelp.ProjectUpload.MAIN,
122 ) 126 )
123 project_upload_parser.set_defaults(func=handle_projects) 127 project_upload_parser.set_defaults(func=handle_projects)
124 project_upload_parser.set_defaults(projects_func=upload_files) 128 project_upload_parser.set_defaults(projects_func=upload_files)
125 129
126 project_upload_parser.add_argument( 130 project_upload_parser.add_argument(
127 'source_dir', help=const.ArgumentsHelp.PROJECT_SOURCE_DIR, 131 'source_dir', help=const.ArgumentsHelp.PROJECT_SOURCE_DIR,
(...skipping 25 matching lines...) Expand all
153 args = parse_args() 157 args = parse_args()
154 158
155 if args.verbose: 159 if args.verbose:
156 logging.basicConfig(level=logging.INFO) 160 logging.basicConfig(level=logging.INFO)
157 161
158 args.func(args) 162 args.func(args)
159 163
160 164
161 if __name__ == '__main__': 165 if __name__ == '__main__':
162 main() 166 main()
OLDNEW
« no previous file with comments | « no previous file | cms/translations/xtm/constants.py » ('j') | cms/translations/xtm/xtm_api.py » ('J')

Powered by Google App Engine
This is Rietveld