예제 #1
0
from future_todo.t3p.views import plugin, plugin_handler


class fooplugin(plugin):
    """Concrete class for foo plugin."""

    def __init__(self, list):
        print "meow!"
        self.list = list

    def run(self):
        # do something here
        list = self.list
        output_log = "You called me with: %s, %s, %s, %s" % (
            list.api_url,
            list.api_username,
            list.api_password,
            list.api_token,
        )
        return output_log

    name = "example"
    description = "insert description here"


plugin_handler.register_plugin(fooplugin)
예제 #2
0
                ## Some debugging about date
                self.log.append("0: %s  <br>" % (new.title))
                self.log.append("1: %s  %s<br>" % (task.find("due").text, new.due_date))
                self.log.append("2: %s  %s<br>" % (task.find("created-at").text, new.created_date))
                
                """ 
                FIXME:  when saved create_date will be changed to now(), since
                default self.save method is defined that way. In future we might 
                need a workaround
                """
                
                #new.altsave()
                new.save() 
                
    def __init__(self, list):
        print "Initializing Tracks plugin"
        self.list = list
        self.log = []
        
    def run(self):
        #do something here
        list = self.list
        self.MatchItems(list)
        self.log.append("You called me with: %s, %s, %s, %s" % (list.api_url, list.api_username, list.api_password, list.api_token))
        return self.log
        
    name = "tracks"
    description = "Plugin for Tracks 1.7.x (http://www.getontracks.org/)"

plugin_handler.register_plugin(tracksplugin)