--- a/plugin_pack.py Tue Apr 01 04:24:32 2008 -0400
+++ b/plugin_pack.py Tue Apr 01 04:25:07 2008 -0400
@@ -91,7 +91,13 @@
- def load_plugins(self):
+ def load_plugins(self, types, depends): for file in glob.glob('*/plugins.cfg'):
parser = ConfigParser.ConfigParser()
@@ -104,6 +110,20 @@
for plugin in parser.sections():
p = Plugin(os.path.dirname(file), plugin, parser)
+ # this is kind of hacky, but if we have types, we check to see + # if the type is in list of types to load. + # now we check if the give plugins depends match the search + if len(set(depends).intersection(set(p.depends))) == 0: def list_type(self, type):
@@ -204,47 +224,36 @@
# create our main instance
- # load all our plugin data
- opts, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
+ opts, args = getopt.getopt(sys.argv[1:], shortopts) except getopt.error, msg:
+ types.append('abusive') + types.append('default') + types.append('incomplete') + depends.append('finch') + depends.append('pidgin') + depends.append('purple')
- if o in ('-a', '--abusive-plugins'):
- pp.print_names(pp.abusive_plugins())
- elif o == '--dependency-graph':
- elif o in ('-D', '--dist-dirs'):
- elif o in ('-d', '--default-plugins'):
- pp.print_names(pp.default_plugins())
- elif o in ('-h', '--help'):
- elif o in ('-i', '--incomplete-plugins'):
- pp.print_names(pp.incomplete_plugins())
- elif o in ('-p', '--plugin'):
+ print "args: %s" % (string.join(args, ' ')) + pp.load_plugins(types, depends) + pp.print_names(pp.plugins.values()) if __name__ == "__main__":