equal
deleted
inserted
replaced
6 # |
6 # |
7 # This script is provided under the terms of the GNU General Public License, |
7 # This script is provided under the terms of the GNU General Public License, |
8 # see the file COPYING in the root mcabber source directory. |
8 # see the file COPYING in the root mcabber source directory. |
9 # |
9 # |
10 |
10 |
11 import sys |
11 import sys, getopt |
12 import pynotify |
12 import pynotify |
13 |
13 |
14 CONFFILE = "mcevent.cfg" |
14 CONFFILE = "mcevent.cfg" |
15 |
15 |
16 # Default option values |
16 # Default option values |
200 fileHandle.close() |
200 fileHandle.close() |
201 |
201 |
202 |
202 |
203 ##### MAIN ##### |
203 ##### MAIN ##### |
204 |
204 |
|
205 try: |
|
206 opts, args = getopt.getopt(sys.argv[1:], "c:", ["help", "output="]) |
|
207 except getopt.GetoptError, err: |
|
208 print str(err) |
|
209 sys.exit(2) |
|
210 |
|
211 for o, a in opts: |
|
212 if o == "-c": |
|
213 CONFFILE = a |
|
214 |
205 NOTIFY_LOADED = False |
215 NOTIFY_LOADED = False |
206 |
216 |
207 # read stdin line by line |
217 # read stdin line by line |
208 while 1: |
218 while 1: |
209 try: |
219 try: |
219 process_line(lineargs) |
229 process_line(lineargs) |
220 |
230 |
221 if NOTIFY_LOADED: |
231 if NOTIFY_LOADED: |
222 pynotify.uninit() |
232 pynotify.uninit() |
223 |
233 |
|
234 sys.exit(0) |
|
235 |
224 # vim:set et sts=4 sw=4: |
236 # vim:set et sts=4 sw=4: |