3
# Copyright (c) 2012 - The IBus Cangjie authors
5
# This file is part of ibus-cangjie, the IBus Cangjie input method engine.
7
# ibus-cangjie is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Lesser General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
12
# ibus-cangjie is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU Lesser General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with ibus-cangjie. If not, see <http://www.gnu.org/licenses/>.
25
from gi.repository import IBus
27
from ibus_cangjie import IMApp
30
componentdir = "@COMPONENTDIR@"
33
locale.setlocale(locale.LC_ALL, "")
37
parser = argparse.ArgumentParser(description="Cangjie input method engine")
38
parser.add_argument("--ibus", "-i", action="store_true",
39
help="let the engine know it is executed by IBus")
40
parser.add_argument("--daemonize", "-d", action="store_true",
41
help="daemonize the engine")
42
parser.add_argument("engine", choices=("cangjie", "quick"),
43
help="Input method engine to use")
44
args = parser.parse_args()
51
IMApp(args.ibus, args.engine, componentdir).run()