| 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 30 matching lines...) Expand all Loading... |
| 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 '-g', '--is_guest_manifest', action='store', metavar='GUEST_MANIFEST', | 46 '-g', '--is_guest_manifest', action='store', metavar='GUEST_MANIFEST', |
| 47 help='Generate a guest mode capable manifest') | 47 help='Generate a guest mode capable manifest') |
| 48 parser.add_option( | 48 parser.add_option( |
| 49 '--use_chromevox_next', action='store', metavar='CHROMEVOX2', | 49 '--use_chromevox_next', action='store', metavar='CHROMEVOX2', |
| 50 help='Generate a ChromeVox next manifest') | 50 help='Generate a ChromeVox next manifest') |
| 51 parser.add_option( |
| 52 '--set_version', action='store', metavar='SET_VERSION', |
| 53 help='Set the extension version') |
| 54 parser.add_option( |
| 55 '--key', action='store', metavar='KEY', |
| 56 help='Set the extension key') |
| 51 | 57 |
| 52 options, args = parser.parse_args() | 58 options, args = parser.parse_args() |
| 53 if len(args) != 1: | 59 if len(args) != 1: |
| 54 print >>sys.stderr, 'Expected exactly one argument' | 60 print >>sys.stderr, 'Expected exactly one argument' |
| 55 sys.exit(1) | 61 sys.exit(1) |
| 56 processJinjaTemplate(args[0], options.output_manifest, parser.values.__dict__) | 62 processJinjaTemplate(args[0], options.output_manifest, parser.values.__dict__) |
| 57 | 63 |
| 58 if __name__ == '__main__': | 64 if __name__ == '__main__': |
| 59 main() | 65 main() |
| OLD | NEW |