def get(self): # ぐぐるちゃんのユーザーを取得しておく guguruchan = Twitter.get_guguruchan() # フォロワーのツイート一覧を取得する timeline = Twitter.get_follower_timeline() # ツイートを1つずつ解析して、データストアに保存する for status in timeline: # 自分自身のツイートは解析しない if guguruchan.GetId() == status.GetUser().GetId(): continue self.analyze_status(status)
def get(self): # 文章を取得する s = self.get_random_entity(db.Query(sentence.Sentence), None) if s == None: return # 置換する単語を取得する chipCount = len(s.chips) arguments = [] for i in range(chipCount): chip = s.chips[i] w = self.get_random_entity(db.Query(word.Word), chip) arguments.append(u'ぬる' if w == None else w.key().name()) # 文章の名詞の入る場所に名詞を当て込む chippedText = s.chippedText text = chippedText.format(*arguments) # ツイートを投稿する TwitterHelper.tweet(unicode(text))
def get(self): # リムーブする TwitterHelper.remove()
def get(self): # フォロー返しをする TwitterHelper.refollow();