LEFT | RIGHT |
1 # vim:set et sts=4 sw=4: | 1 # vim:set et sts=4 sw=4: |
2 # | 2 # |
3 # ibus - The Input Bus | 3 # ibus - The Input Bus |
4 # | 4 # |
5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> | 5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> |
6 # Copyright (c) 2007-2010 Red Hat, Inc. | 6 # Copyright (c) 2007-2010 Red Hat, Inc. |
7 # | 7 # |
8 # This library is free software; you can redistribute it and/or | 8 # This library is free software; you can redistribute it and/or |
9 # modify it under the terms of the GNU Lesser General Public | 9 # modify it under the terms of the GNU Lesser General Public |
10 # License as published by the Free Software Foundation; either | 10 # License as published by the Free Software Foundation; either |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 <textdomain>ibus</textdomain> | 74 <textdomain>ibus</textdomain> |
75 <engines>""" | 75 <engines>""" |
76 engine = u"""\t\t<engine> | 76 engine = u"""\t\t<engine> |
77 <name>%s</name> | 77 <name>%s</name> |
78 <language>%s</language> | 78 <language>%s</language> |
79 <license>GPL</license> | 79 <license>GPL</license> |
80 <author>Peng Huang <shawn.p.huang@gmail.com></auth
or> | 80 <author>Peng Huang <shawn.p.huang@gmail.com></auth
or> |
81 <layout>%s</layout> | 81 <layout>%s</layout> |
82 <longname>%s</longname> | 82 <longname>%s</longname> |
83 <description>%s</description> | 83 <description>%s</description> |
| 84 <icon>ibus-keyboard</icon> |
84 <rank>%d</rank> | 85 <rank>%d</rank> |
85 </engine>""" | 86 </engine>""" |
86 footer = u"""\t</engines> | 87 footer = u"""\t</engines> |
87 </component>""" | 88 </component>""" |
88 | 89 |
89 print header | 90 print header |
90 | 91 |
91 whitelist = parse_whitelist() | 92 whitelist = parse_whitelist() |
92 for name, vname, sdesc, desc, languages in parse_xml(): | 93 for name, vname, sdesc, desc, languages in parse_xml(): |
93 layout = "%s(%s)" % (name, vname) if vname else name | 94 layout = "%s(%s)" % (name, vname) if vname else name |
(...skipping 14 matching lines...) Expand all Loading... |
108 line = line.strip() | 109 line = line.strip() |
109 if not line: | 110 if not line: |
110 continue | 111 continue |
111 if line.startswith("#"): | 112 if line.startswith("#"): |
112 continue | 113 continue |
113 whitelist.append(line.split()[0]) | 114 whitelist.append(line.split()[0]) |
114 return set(whitelist) | 115 return set(whitelist) |
115 | 116 |
116 if __name__ == "__main__": | 117 if __name__ == "__main__": |
117 gen_xml() | 118 gen_xml() |
LEFT | RIGHT |