Re: 新的qq插件 pidgin-lwqq 0.2c-preview 更新
发表于 : 2013-12-11 9:36
唉,估计是手滑了,打错了.ooinzaghi 写了:楼主在1楼的changelog怎么前3个是12年,过了这么久刚发现。。
唉,估计是手滑了,打错了.ooinzaghi 写了:楼主在1楼的changelog怎么前3个是12年,过了这么久刚发现。。
今天发现个小问题,更新了下。懒得去看的直接把原来脚本的message = re.findall(r">(.+)<",message)改为 message = re.findall(r" >(.+) <",message)就可以了。(原来的正则忽视了加粗的文本的情况,所以如果有加粗的字的话就不能截取了,所以加了两个空格,这样会好一点。)xiehuc 写了:这个很不错啊,我可以加到README和wiki上去.dispensable 写了:群聊提醒脚本:http://dispensable.github.io/2013/12/09/
代码: 全选
python:
1#!/usr/bin/env python
2#_*_ coding: utf-8 _*_
3
4import sys
5import dbus, gobject
6from dbus.mainloop.glib import DBusGMainLoop
7
8def reply_to_group(n):
9 bus = dbus.SessionBus()
10 obj = bus.get_object("im.pidgin.purple.PurpleService",
11 "/im/pidgin/purple/PurpleObject")
12 purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
13 reply = raw_input("reply:")
14#下一行自定义字体和字体颜色,<b>表示加粗
15 reply = '<b><font color="#0080ff" face="微软雅黑" >' + reply + '</font></u>'
16 purple.PurpleConvChatSend(purple.PurpleConvChat(n), reply)
17
18#my_func函数,来消息时执行相应的动作。
19def my_func(account, sender, message, conversation, flags):
20 print message
21 n = int(conversation)
22 reply_to_group(n)
23
24#pidgin的DBUS进程,来消息时自动执行my_func函数
25dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
26bus = dbus.SessionBus()
27
28bus.add_signal_receiver(my_func,
29 dbus_interface="im.pidgin.purple.PurpleInterface",
30 signal_name="ReceivedChatMsg")
31
32loop = gobject.MainLoop()
33loop.run()
还是没改过来xiehuc 写了:唉,估计是手滑了,打错了.ooinzaghi 写了:楼主在1楼的changelog怎么前3个是12年,过了这么久刚发现。。
这个插件有一些fork还在做改进,你可以试试这个人的 https://github.com/Psykar/gnome-shell-extensions-pidgincqcyj222 写了:谁有支持gnome 3.10的gnome-shell-extensions-pidgin插件呀!!!!!!
这个插件用在3.10上一堆BUG呀!更本没法用呀!!!!!!
用过,只能收第一条消息!后面发的根本看不到!lainme 写了:这个插件有一些fork还在做改进,你可以试试这个人的 https://github.com/Psykar/gnome-shell-extensions-pidgincqcyj222 写了:谁有支持gnome 3.10的gnome-shell-extensions-pidgin插件呀!!!!!!
这个插件用在3.10上一堆BUG呀!更本没法用呀!!!!!!
如果还是有问题,目前就无解了。
有人又修改了下,在3.10上应该可以了。 https://github.com/GutenYe/gnome-shell- ... ree/bugfixcqcyj222 写了:用过,只能收第一条消息!后面发的根本看不到!lainme 写了:这个插件有一些fork还在做改进,你可以试试这个人的 https://github.com/Psykar/gnome-shell-extensions-pidgincqcyj222 写了:谁有支持gnome 3.10的gnome-shell-extensions-pidgin插件呀!!!!!!
这个插件用在3.10上一堆BUG呀!更本没法用呀!!!!!!
如果还是有问题,目前就无解了。