Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: infra/tools/new_tool/templates/main.template

Issue 1172053003: Created infra/tools/new_tool (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: More tests Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/tools/new_tool/new_tool.py ('k') | infra/tools/new_tool/templates/test.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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__':
« no previous file with comments | « infra/tools/new_tool/new_tool.py ('k') | infra/tools/new_tool/templates/test.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698