Re: [Freevo-users] Re: Plugin development.
I remember there is a program on Freshmeat that gets comic strips from hundreds (?) of sites.. I think it's written as a Perl-CGI but it may be a good startingpoint. ;) // Wigren Jortan wrote: I've just post the plugin to the list. For the moment only Dilbert comics are possible to grab but would be possible to extend. If you are intrested in extending it or including it in some other plugin, thats ok with me. I'm satisfied with this one but I am willing to help if you have some ideas. /Bjorn --- Michael Ruelle [EMAIL PROTECTED] skrev: Just to butt in a little bit. once you get your comic strip plugin done. I would be interested in helping you extend it to something like the headlines plugin where you put a list of places to grab the comics from. -- Mike Ruelle [EMAIL PROTECTED] http://world.std.com/~mruelle/ On Sunday 12 October 2003 15:58, Jortan wrote: Ah, that was easy. It works. Thanks! --- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: Thanks for your help but I can't get it working. It's my lack of knowledge in Python programming that is the main problem. I can't figure out how to return 'items', how does this list look like? I've tried serveral ways but this is, basically, what I want: class PluginInterface(plugin.MainMenuPlugin): def items(self, parent): items = [] items.append(MenuItem('Grab todays Dilbert strip', self.get_strip1)) return [ items ] Only 'return items'. items is a list, if you return [ items ] you return a list in a list. Dischi -- It might look like I'm doing nothing, but at the cellular level I'm really quite busy. --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
[Freevo-users] Re: Plugin development.
Jortan wrote: What I meant was that I want the menu items to appear in Images-section when entering from Main menu, just like Webradio appears when entering Music section from Main menu. Webradio plugin is defined as 'class PluginInterface(plugin.MainMenuPlugin)' so I guess my plugin should not be an item plugin. But as I mentioned the Webradio plugin is too complicated for me to follow. Ah, ok. Yes, it's a MenuMenu plugin. If you put a MenuMenu plugin into images/plugins, it will show itself in the Image Main Menu. You don't return actions() here, you return a list items(). This is something which inherits from Item (item.py). Webradio is more complex because it adds a menu with a submenu and so on. A very simple example is images/plugins/camera.py. It returns a DirItem (directory) when a given usb device is plugged in. Or you look at video/plugins/linkbrowser. The class at the end is the PluginInterface. And it uses a menu based on Link (the second class in this file, inherits from Item). Dischi -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Re: Plugin development.
Thanks for your help but I can't get it working. It's my lack of knowledge in Python programming that is the main problem. I can't figure out how to return 'items', how does this list look like? I've tried serveral ways but this is, basically, what I want: class PluginInterface(plugin.MainMenuPlugin): def items(self, parent): items = [] items.append(MenuItem('Grab todays Dilbert strip', self.get_strip1)) return [ items ] def get_strip1(self, arg=None, menuw=None): self.get_strip(1) --- It fails with: AttributeError: 'list' object has no attribute 'image' /Bjorn --- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: What I meant was that I want the menu items to appear in Images-section when entering from Main menu, just like Webradio appears when entering Music section from Main menu. Webradio plugin is defined as 'class PluginInterface(plugin.MainMenuPlugin)' so I guess my plugin should not be an item plugin. But as I mentioned the Webradio plugin is too complicated for me to follow. Ah, ok. Yes, it's a MenuMenu plugin. If you put a MenuMenu plugin into images/plugins, it will show itself in the Image Main Menu. You don't return actions() here, you return a list items(). This is something which inherits from Item (item.py). Webradio is more complex because it adds a menu with a submenu and so on. A very simple example is images/plugins/camera.py. It returns a DirItem (directory) when a given usb device is plugged in. Or you look at video/plugins/linkbrowser. The class at the end is the PluginInterface. And it uses a menu based on Link (the second class in this file, inherits from Item). Dischi -- Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Re: Plugin development.
Ah, that was easy. It works. Thanks! --- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: Thanks for your help but I can't get it working. It's my lack of knowledge in Python programming that is the main problem. I can't figure out how to return 'items', how does this list look like? I've tried serveral ways but this is, basically, what I want: class PluginInterface(plugin.MainMenuPlugin): def items(self, parent): items = [] items.append(MenuItem('Grab todays Dilbert strip', self.get_strip1)) return [ items ] Only 'return items'. items is a list, if you return [ items ] you return a list in a list. Dischi -- It might look like I'm doing nothing, but at the cellular level I'm really quite busy. --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Re: Plugin development.
Just to butt in a little bit. once you get your comic strip plugin done. I would be interested in helping you extend it to something like the headlines plugin where you put a list of places to grab the comics from. -- Mike Ruelle [EMAIL PROTECTED] http://world.std.com/~mruelle/ On Sunday 12 October 2003 15:58, Jortan wrote: Ah, that was easy. It works. Thanks! --- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: Thanks for your help but I can't get it working. It's my lack of knowledge in Python programming that is the main problem. I can't figure out how to return 'items', how does this list look like? I've tried serveral ways but this is, basically, what I want: class PluginInterface(plugin.MainMenuPlugin): def items(self, parent): items = [] items.append(MenuItem('Grab todays Dilbert strip', self.get_strip1)) return [ items ] Only 'return items'. items is a list, if you return [ items ] you return a list in a list. Dischi -- It might look like I'm doing nothing, but at the cellular level I'm really quite busy. --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Re: Plugin development.
I've just post the plugin to the list. For the moment only Dilbert comics are possible to grab but would be possible to extend. If you are intrested in extending it or including it in some other plugin, thats ok with me. I'm satisfied with this one but I am willing to help if you have some ideas. /Bjorn --- Michael Ruelle [EMAIL PROTECTED] skrev: Just to butt in a little bit. once you get your comic strip plugin done. I would be interested in helping you extend it to something like the headlines plugin where you put a list of places to grab the comics from. -- Mike Ruelle [EMAIL PROTECTED] http://world.std.com/~mruelle/ On Sunday 12 October 2003 15:58, Jortan wrote: Ah, that was easy. It works. Thanks! --- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: Thanks for your help but I can't get it working. It's my lack of knowledge in Python programming that is the main problem. I can't figure out how to return 'items', how does this list look like? I've tried serveral ways but this is, basically, what I want: class PluginInterface(plugin.MainMenuPlugin): def items(self, parent): items = [] items.append(MenuItem('Grab todays Dilbert strip', self.get_strip1)) return [ items ] Only 'return items'. items is a list, if you return [ items ] you return a list in a list. Dischi -- It might look like I'm doing nothing, but at the cellular level I'm really quite busy. --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Re: Plugin development.
Thanks for the info, 3 dummy functions solved my problem and the plugin works. I will post it to the list when it's ready. However, I've changed my mind. I want the three menu items to appear in the Image section of freevo (not when ENTER a directory as now). I looked at the webradio-plugin (which shows up in music section) but did not figure out how to write it. Would it be hard to implement that? It looks a bit complicated when looking at the webradio plugin. /Bjorn --- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: Hi, I'm writing a plugin where I want 3 menu items to appear when I ENTER a directory. Each of these items will, when selected, call the same function but with different argument. How do I code that? You write an ItemPlugin. You put it into src/plugins if it's not a special plugin for video or audio. The ItemPlugin needs a function actions() to return a list of possible actions. This function get's the item, check for 'if item.type == 'directory':' and return [] if not (since you only want dirs). An action can be a list of callback and name or a menuitem (from menu.py). The first as no arguments, but you can create a dummy function: def realfunction(self, parameter): do stuff def call_with_arg_1(self, menuw=menuw, arg=arg): self.realfunction('foo') ... If you use MenuItem, you can also set an argument. See file_ops.py for an example. I'm at work and do not have any code example, sorry. Thanks in advance If you need more info, please ask. And if you plugin does something usefull to other people, please send it to the list when you've done it. Dischi -- Es gibt 10 Arten von Menschen die Binär verstehen, diejenigen die es tun, und diejenigen die es nicht tun. --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
[Freevo-users] Re: Plugin development.
Jortan wrote: Thanks for the info, 3 dummy functions solved my problem and the plugin works. I will post it to the list when it's ready. However, I've changed my mind. I want the three menu items to appear in the Image section of freevo (not when ENTER a directory as now). Than you should place it in src/images/plugins. If you want to activate it only for image items, check for item.type == 'image' I looked at the webradio-plugin (which shows up in music section) but did not figure out how to write it. Would it be hard to implement that? It looks a bit complicated when looking at the webradio plugin. Look at src/video/plugins/mover.py. The smallest item plugin we have. Dischi -- A lecture is a process where information is passed from the notebook of the lecturer to the notebook of the student without necessarily passing through the minds of either. --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users
Re: [Freevo-users] Re: Plugin development.
--- Dirk Meyer [EMAIL PROTECTED] skrev: Jortan wrote: Thanks for the info, 3 dummy functions solved my problem and the plugin works. I will post it to the list when it's ready. However, I've changed my mind. I want the three menu items to appear in the Image section of freevo (not when ENTER a directory as now). Than you should place it in src/images/plugins. If you want to activate it only for image items, check for item.type == 'image' I looked at the webradio-plugin (which shows up in music section) but did not figure out how to write it. Would it be hard to implement that? It looks a bit complicated when looking at the webradio plugin. Look at src/video/plugins/mover.py. The smallest item plugin we have. What I meant was that I want the menu items to appear in Images-section when entering from Main menu, just like Webradio appears when entering Music section from Main menu. Webradio plugin is defined as 'class PluginInterface(plugin.MainMenuPlugin)' so I guess my plugin should not be an item plugin. But as I mentioned the Webradio plugin is too complicated for me to follow. /Bjorn Höstrusk och grå moln - köp en resa till solen på Yahoo! Resor på adressen http://se.docs.yahoo.com/travel/index.html --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ Freevo-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-users