| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Generate a C++ header from ibus_input_methods.txt. | 6 """Generate a C++ header from ibus_input_methods.txt. |
| 7 | 7 |
| 8 This program generates a C++ header file containing the information on | 8 This program generates a C++ header file containing the information on |
| 9 available input methods. It parses input_methods.txt, and then generates a | 9 available input methods. It parses input_methods.txt, and then generates a |
| 10 static array definition from the information extracted. The input and output | 10 static array definition from the information extracted. The input and output |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 engine['if'] = columns[3] | 114 engine['if'] = columns[3] |
| 115 engines.append(engine) | 115 engines.append(engine) |
| 116 | 116 |
| 117 output = CreateEngineHeader(engines) | 117 output = CreateEngineHeader(engines) |
| 118 output_file = open(sys.argv[2], 'w') | 118 output_file = open(sys.argv[2], 'w') |
| 119 output_file.write(output) | 119 output_file.write(output) |
| 120 | 120 |
| 121 | 121 |
| 122 if __name__ == '__main__': | 122 if __name__ == '__main__': |
| 123 main(sys.argv) | 123 main(sys.argv) |
| OLD | NEW |