Пример #1
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.threshold = 3
     self.counter = 0
     self.last_user = ""
     self.synchronous = False
     self.db = data_manager.Factoider()
Пример #2
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.synchronous = False
     self.appid = 'D7KT0yvV34Fwo1YDnWKdCQibOdWcK9VzBHjut.3Y8wDrlfZKSluzcGje3wkGw3eE4CAjf65aTZs3xLd8DszXSdtFrYlyUiQ-'
     self.region = 'e1'
     self.url = 'http://answers.yahooapis.com/AnswersService/V1/questionSearch'
     self.output = 'json'
Пример #3
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.threshold = 3
   self.counter = 0
   self.last_user = ""
   self.synchronous = False
   self.db = data_manager.Factoider()
Пример #4
0
 def __init_(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
   self.appid = 'D7KT0yvV34Fwo1YDnWKdCQibOdWcK9VzBHjut.3Y8wDrlfZKSluzcGje3wkGw3eE4CAjf65aTZs3xLd8DszXSdtFrYlyUiQ-'
   self.region = 'e1'
   self.url = 'http://answers.yahooapis.com/AnswersService/V1/questionSearch'
   self.output = 'json'
Пример #5
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
   self.url = 'https://a.4cdn.org/'
   self.function_dict = {
                         "default": self.handle_get_random_thread,
                         "random_thread": self.handle_get_random_thread,
                        }
   self.boards = self.__fetch_boards_dict()
Пример #6
0
    def __init__(self):
        BaseActionPlugin.__init__(self)
        self.last_user = ""
        self.synchronous = False

        self.function_dict={
            'genre': self.get_online_by_gender,
            'nick': self.get_url_by_nick,
            'help': self.help,
            }
Пример #7
0
    def __init__(self):
        BaseActionPlugin.__init__(self)
        self.last_user = ""
        self.synchronous = False

        self.function_dict = {
            'genre': self.get_online_by_gender,
            'nick': self.get_url_by_nick,
            'help': self.help,
        }
Пример #8
0
  def __init__(self):
    BaseActionPlugin.__init__(self)
    self.host = 'identi.ca'
    self.api_root = '/api/'
    self.oauth_root = self.api_root + 'oauth/'
    self.local_name = 'identica'

    try:
      parser = SafeConfigParser()
      parser.read('plugins/identica.yapsy-plugin')
      self.consumer_token = parser.get('Auth', 'consumer_token')
      self.consumer_secret = parser.get('Auth', 'consumer_secret')
      self.access_key = parser.get('Auth', 'access_key')
      self.access_secret = parser.get('Auth', 'access_secret')
    except:
      logging.error("Error when parsing identica plugin info.")
Пример #9
0
  def __init__(self):
    BaseActionPlugin.__init__(self)
    try:
      parser = SafeConfigParser()
      parser.read('plugins/lastfm.yapsy-plugin')
      self._api_key = parser.get('Auth', 'key')
    except:
      logging.error("Error when parsing lastfm plugin info.")

    self.last = pylast.get_lastfm_network(api_key = self._api_key)

    #TODO: Localize commands
    self.function_dict = {
                          "user": self.get_user_track,
                          "artist": self.get_artist_tracks,
                          "tag_artists": self.get_tag_artists,
                          "tag_albums": self.get_tag_albums,
                         }
Пример #10
0
  def __init__(self):
    BaseActionPlugin.__init__(self)
    try:
      parser = SafeConfigParser()
      parser.read('plugins/lastfm.yapsy-plugin')
      self._api_key = parser.get('Auth', 'key')
    except:
      logging.error("Error when parsing lastfm plugin info.")

    self.last = pylast.get_lastfm_network(api_key = self._api_key)

    #TODO: Localize commands
    self.function_dict = {
                          "user": self.get_user_track,
                          "artist": self.get_artist_tracks,
                          "tag_artists": self.get_tag_artists,
                          "tag_albums": self.get_tag_albums,
                         }
Пример #11
0
    def __init__(self):
        BaseActionPlugin.__init__(self)
        self.synchronous = False

        tuiter_conf = self.get_configuration('plugins/tuiter.yapsy-plugin',
                                             [
                                                 {
                                                     "section" : "Auth",
                                                     "conf" : "app_key"
                                                 },
                                                 {
                                                     "section" : "Auth",
                                                     "conf" :"app_secret"
                                                 }
                                             ])


        self.api = Twython(tuiter_conf.get("app_key"),
                           tuiter_conf.get("app_secret"))

        self.func_dict = {
            "pull" : self.pull,
            "help" : self.help
        }
Пример #12
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.synchronous = False
     self.d = data_manager
Пример #13
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
   self.d = data_manager
Пример #14
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.baseurl = 'http://rss.slashdot.org/Slashdot/slashdot'
Пример #15
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.db = data_manager.Factoider()
Пример #16
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.synchronous = False
Пример #17
0
 def __init__(self):
     self.trigger = re.compile(
         '(http|https)://([A-Za-z0-9])+(.[a-zA-Z]*)+(/[a-zA-Z0-9_%=\?&.])*')
     BaseActionPlugin.__init__(self)
     TextTriggerPlugin.__init__(self)
     self.synchronous = False
Пример #18
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.threshold = 3
   self.counter = 0
   self.last_user = ""
   self.synchronous = True
Пример #19
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
   self.base_url = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson"
Пример #20
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
Пример #21
0
 def __init__(self):
     BaseActionPlugin.__init__(self)
     self.synchronous = False
     self.base_url = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson"
Пример #22
0
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.baseurl = 'http://rss.slashdot.org/Slashdot/slashdot'