コード例 #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
ファイル: preguntar.py プロジェクト: kreigiron/tio_chema
 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
ファイル: ping.py プロジェクト: tian2992/tio_chema
 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
ファイル: preguntar.py プロジェクト: miguelchuga/tio_chema
 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
ファイル: 4chan.py プロジェクト: latopas/tio_chema
 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
ファイル: chaturbate.py プロジェクト: latopas/tio_chema
    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
ファイル: chaturbate.py プロジェクト: kreigiron/tio_chema
    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
ファイル: identica.py プロジェクト: killman/bot
  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
ファイル: lastfm.py プロジェクト: miguelchuga/tio_chema
  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
ファイル: tuiter.py プロジェクト: kreigiron/tio_chema
    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
ファイル: db_test.py プロジェクト: tian2992/tio_chema
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
   self.d = data_manager
コード例 #14
0
ファイル: diagonalpunto.py プロジェクト: kreigiron/tio_chema
 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
ファイル: news.py プロジェクト: kreigiron/tio_chema
 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
ファイル: ping.py プロジェクト: latopas/tio_chema
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.threshold = 3
   self.counter = 0
   self.last_user = ""
   self.synchronous = True
コード例 #19
0
ファイル: temblor.py プロジェクト: latopas/tio_chema
 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
ファイル: db_test.py プロジェクト: latopas/tio_chema
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.synchronous = False
コード例 #21
0
ファイル: temblor.py プロジェクト: kreigiron/tio_chema
 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
ファイル: diagonalpunto.py プロジェクト: latopas/tio_chema
 def __init__(self):
   BaseActionPlugin.__init__(self)
   self.baseurl = 'http://rss.slashdot.org/Slashdot/slashdot'