| Index: infra/tools/new_tool/templates/main.template
|
| diff --git a/infra/tools/antibody/__main__.py b/infra/tools/new_tool/templates/main.template
|
| similarity index 57%
|
| copy from infra/tools/antibody/__main__.py
|
| copy to infra/tools/new_tool/templates/main.template
|
| index f3db2b30391ea3486ab7e2960fe8c5c89712f5fe..e0cb8a1db95c4c1d6ceecabd1cf4d93ff3fcc6c0 100644
|
| --- a/infra/tools/antibody/__main__.py
|
| +++ b/infra/tools/new_tool/templates/main.template
|
| @@ -1,20 +1,15 @@
|
| -# Copyright 2015 The Chromium Authors. All rights reserved.
|
| -# Use of this source code is governed by a BSD-style license that can be
|
| -# found in the LICENSE file.
|
| +"""<General description of {Toolname} here.>
|
|
|
| -"""Antibody is meant to audit reviews for the Chromium project.
|
| -
|
| -Example invocation: [TBD]
|
| - ./run.py infra.tools.antibody <arguments>
|
| +[TBD] Example invocation:
|
| +./run.py infra.tools.{toolname} <arguments>
|
| """
|
| -
|
| # This file is untested, keep as little code as possible in there.
|
|
|
| import argparse
|
| import logging
|
| import sys
|
|
|
| -from infra.tools.antibody import antibody
|
| +from infra.tools.{toolname} import {toolname}
|
| import infra_libs.logs
|
|
|
|
|
| @@ -24,16 +19,16 @@ LOGGER = logging.getLogger(__name__)
|
|
|
| def main(argv):
|
| parser = argparse.ArgumentParser(
|
| - prog="antibody",
|
| + prog="{toolname}",
|
| description=sys.modules['__main__'].__doc__)
|
| - antibody.add_argparse_options(parser)
|
| +
|
| + {toolname}.add_argparse_options(parser)
|
| infra_libs.logs.add_argparse_options(parser)
|
| _args = parser.parse_args(argv)
|
| -
|
| infra_libs.logs.process_argparse_options(parser)
|
|
|
| # Do more processing here
|
| - LOGGER.info('Antibody starting')
|
| + LOGGER.info('{Toolname} starting.')
|
|
|
|
|
| if __name__ == '__main__':
|
|
|