pidgin/purple-plugin-pack

Parents 18e221cca584
Children 3971ae9fe83f
plugin_pack.py: mark broken plugins with purple3=no
--- a/enhancedhist/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/enhancedhist/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[Enhanced History]
-type=broken
+type=default
depends=pidgin
provides=enhancedhist
summary=An enhanced version of the history plugin
description=%(summary)s Grants ability to select the number of previous conversations to show instead of just one.
authors=Andrew Pangborn
introduced=2.3.0
+purple3=no
--- a/mystatusbox/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/mystatusbox/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[Mystatusbox]
-type=broken
+type=default
depends=pidgin
provides=mystatusbox
summary=Hide/Show the per-account statusboxes
description=You can show all the per-account statusboxes, hide all of them, or just show the ones that are in a different status from the global status. For ease of use, you can bind keyboard shortcuts for the menu items.
authors=Sadrul Habib Chowdhury
introduced=1.0beta1
+purple3=no
--- a/napster/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/napster/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,5 +1,5 @@
[Napster Protocol Plugin]
-type=broken
+type=default
depends=purple
provides=napster
summary=NAPSTER Protocol Plugin
@@ -7,4 +7,5 @@
authors=Rob Flynn
introduced=1.0beta6
notes=Introduced into the Purple Plugin Pack after it was removed from libpurple.
+purple3=no
--- a/nicksaid/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/nicksaid/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[Nicksaid]
-type=broken
+type=default
depends=pidgin
provides=nicksaid
summary=Record when someone said your nick in a chat
description=%(summary)s
authors=Sadrul Habib Chowdhury
introduced=1.0beta1
+purple3=no
--- a/ning/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/ning/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[Ning Protocol Plugin]
-type=broken
+type=default
depends=purple json-glib
provides=ning
summary=Protocol plugin for the Ning social networking site framework
description=Protocol plugin for the Ning social networking site framework
authors=Eion Robb
introduced=2.7.0
+purple3=no
--- a/okcupid/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/okcupid/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[OkCupid Protocol Plugin]
-type=broken
+type=default
depends=purple json-glib
provides=okcupid
summary=Protocol plugin for the OkCupid social networking site framework
description=Protocol plugin for the OkCupid social networking site framework
authors=Eion Robb
introduced=2.7.0
+purple3=no
--- a/omegle/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/omegle/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[Omegle Protocol Plugin]
-type=broken
+type=default
depends=purple json-glib
provides=omegle
summary=Protocol plugin for the Omegle social network
description=Protocol plugin for the Omegle social network
authors=Eion Robb
introduced=2.7.0
+purple3=no
--- a/plugin_pack.py Thu Apr 06 01:54:29 2017 -0300
+++ b/plugin_pack.py Thu Apr 06 02:06:29 2017 -0300
@@ -61,6 +61,7 @@
authors = []
introduced = ''
notes = ''
+ purple3 = True
def __init__(self, directory, name, parser):
self.name = name
@@ -78,6 +79,9 @@
if parser.has_option(name, 'notes'):
self.notes = parser.get(name, 'notes')
+ if parser.has_option(name, 'purple3'):
+ self.purple3 = parser.get(name, 'purple3') != 'no'
+
if self.type != 'default' and self.type != 'incomplete' and self.type != 'abusive':
printerr('\'%s\' has an unknown type of \'%s\'!' % (self.name, self.type))
@@ -94,6 +98,9 @@
if self.notes:
output += 'notes: {}\n'.format(self.notes)
+ if not self.purple3:
+ output += 'purple3: no\n'
+
return output
def __lt__(self, other):
@@ -104,7 +111,7 @@
commands = {}
plugins = {}
- def load_plugins(self, types, depends):
+ def load_plugins(self, types, depends, purple_ver=2):
if len(types) == 0:
types = None
@@ -134,6 +141,9 @@
if len(set(depends).intersection(set(p.depends))) == 0:
continue
+ if purple_ver == 3 and not p.purple3:
+ continue
+
self.plugins[p.provides] = p
def list_type(self, type):
@@ -551,9 +561,10 @@
types = []
depends = []
+ purple_ver = 3
try:
- shortopts = 'adfiPp'
+ shortopts = 'adfiPp23'
opts, args = getopt.getopt(sys.argv[1:], shortopts)
except getopt.error as msg:
@@ -573,10 +584,14 @@
depends.append('pidgin')
elif o == '-p':
depends.append('purple')
+ elif o == '-2':
+ purple_ver = 2
+ elif o == '-3':
+ purple_ver = 3
# load the plugins that have been requested, if both lists are empty, all
# plugins are loaded
- pp.load_plugins(types, depends)
+ pp.load_plugins(types, depends, purple_ver)
if(len(args) == 0):
show_usage(pp, 1)
--- a/snpp/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/snpp/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[SNPP]
-type=broken
+type=default
depends=purple
provides=snpp
summary=SNPP Plugin
description=Allows libpurple to send messages over the Simple Network Paging Protocol (SNPP).
authors=Don Seiler
introduced=2.1.0
+purple3=no
--- a/timelog/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/timelog/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[TimeLog]
-type=broken
+type=default
depends=pidgin
provides=timelog
summary=allows the viewing of Pidgin logs within a specific time range
description=%(summary)s
authors=Jon Oberheide
introduced=2.2.0
+purple3=no
--- a/translate/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/translate/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[Translate]
-type=broken
+type=default
depends=purple
provides=translate
summary=Automatic translation of messages
description=Provides automatic translation of messages using Google Translate (default) or Bing Translator
authors=Eion Robb
introduced=2.7.0
+purple3=no
--- a/xchat-chats/plugins.cfg Thu Apr 06 01:54:29 2017 -0300
+++ b/xchat-chats/plugins.cfg Thu Apr 06 02:06:29 2017 -0300
@@ -1,9 +1,10 @@
[XChat Chats]
-type=broken
+type=default
depends=pidgin
provides=xchat-chats
summary=XChat-like chats with Pidgin
description=You can chat in Pidgin using XChat's indented view.
authors=Sadrul Habib Chowdhury
introduced=1.0beta1
+purple3=no