OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import json | 7 import json |
8 import io | 8 import io |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 28 matching lines...) Expand all Loading... |
39 def main(): | 39 def main(): |
40 parser = optparse.OptionParser(description=__doc__) | 40 parser = optparse.OptionParser(description=__doc__) |
41 parser.usage = '%prog [options] <template_manifest_path>' | 41 parser.usage = '%prog [options] <template_manifest_path>' |
42 parser.add_option( | 42 parser.add_option( |
43 '-o', '--output_manifest', action='store', metavar='OUTPUT_MANIFEST', | 43 '-o', '--output_manifest', action='store', metavar='OUTPUT_MANIFEST', |
44 help='File to place generated manifest') | 44 help='File to place generated manifest') |
45 parser.add_option( | 45 parser.add_option( |
46 '--is_guest_manifest', action='store', metavar='NUM', | 46 '--is_guest_manifest', action='store', metavar='NUM', |
47 help='Whether to generate a guest mode capable manifest') | 47 help='Whether to generate a guest mode capable manifest') |
48 parser.add_option( | 48 parser.add_option( |
49 '--is_chromevox_next', action='store', metavar='NUM', | 49 '--is_chromevox_classic', action='store', metavar='NUM', |
50 help='Whether to generate a ChromeVox Next manifest') | 50 help='Whether to generate a ChromeVox Classic manifest') |
51 parser.add_option( | 51 parser.add_option( |
52 '--is_js_compressed', action='store', metavar='NUM', | 52 '--is_js_compressed', action='store', metavar='NUM', |
53 help='Whether compressed JavaScript files are used') | 53 help='Whether compressed JavaScript files are used') |
54 parser.add_option( | 54 parser.add_option( |
55 '--set_version', action='store', metavar='SET_VERSION', | 55 '--set_version', action='store', metavar='SET_VERSION', |
56 help='Set the extension version') | 56 help='Set the extension version') |
57 parser.add_option( | 57 parser.add_option( |
58 '--key', action='store', metavar='KEY', | 58 '--key', action='store', metavar='KEY', |
59 help='Set the extension key') | 59 help='Set the extension key') |
60 | 60 |
61 options, args = parser.parse_args() | 61 options, args = parser.parse_args() |
62 if len(args) != 1: | 62 if len(args) != 1: |
63 print >>sys.stderr, 'Expected exactly one argument' | 63 print >>sys.stderr, 'Expected exactly one argument' |
64 sys.exit(1) | 64 sys.exit(1) |
65 processJinjaTemplate(args[0], options.output_manifest, parser.values.__dict__) | 65 processJinjaTemplate(args[0], options.output_manifest, parser.values.__dict__) |
66 | 66 |
67 if __name__ == '__main__': | 67 if __name__ == '__main__': |
68 main() | 68 main() |
OLD | NEW |