Skip to content

Commit

Permalink
start xdtuxbot
Browse files Browse the repository at this point in the history
  • Loading branch information
bigeagle committed Feb 27, 2011
1 parent ea35733 commit e08ef35
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
application: justin-wong
application: xdtuxbot
version: 1
runtime: python
api_version: 1
Expand Down
14 changes: 9 additions & 5 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

## OAuth认证需要的 Consumer Key 和 Access Token
## August 31, 2010, Basic Auth has been deprecated. All applications must now use OAuth
CONSUMER_KEY = 'NxRNiatciHHyyIjOajlo6g'
CONSUMER_SECRET = 'U9mQR5s1TixeWkjQxNunGIK72ynLb0bllKjWVFQXU2w'
ACCESS_TOKEN = '246485694-XHWHlIAWSpIJWSm1y1HVfU5EeKnQA4Xn9Jcrm39S'
ACCESS_SECRET = 'hJ0aGfaZAlolBOYbjh9j5DcjaMOZsFOrPnsYDg32t4'
#CONSUMER_KEY = 'NxRNiatciHHyyIjOajlo6g'
#CONSUMER_SECRET = 'U9mQR5s1TixeWkjQxNunGIK72ynLb0bllKjWVFQXU2w'
#ACCESS_TOKEN = '246485694-XHWHlIAWSpIJWSm1y1HVfU5EeKnQA4Xn9Jcrm39S'
#ACCESS_SECRET = 'hJ0aGfaZAlolBOYbjh9j5DcjaMOZsFOrPnsYDg32t4'

CONSUMER_KEY = '7LSRAULElzlYxqpV9NUzbQ'
CONSUMER_SECRET = 'T0CGNSG1PsE7TiGhHjwYXcdFIduoYsINv95GH58D4Q'
ACCESS_TOKEN = '258307067-ZGxSl0UMm1OAwqpYSWFvIsN1OpAQeDtFiHCPC4Rc'
ACCESS_SECRET = 'se9ztHd3GiuYm5bYXfVdeGQhUkiJ2MVHn7EryqXuE0'

## 词库配置
DICT_NAME = 'static/sample_dict.xls' # 词库名,注意是绝对路径
Expand All @@ -24,7 +28,7 @@
URL_MENTIONS = '/backdoor2checkmentions' # 提及页面
KEY_FOBACK_ALL = '/AutoFollowBack' # 回Fo动作的触发名 (注意要和Cron.yaml中的保持同步)
# 请修改此 CronJob Key 为其他人无法猜到的字符串,以防被人利用 (注意要和Cron.yaml中的保持同步)
KEY_CRONJOB = '/InputYourCronJobKeyHere'
KEY_CRONJOB = '/CronJobXdTuxBot'
URL_SENDTWEET = '/tweet' # 手动发Tweet到Twitter (例如请求: /tweet2bot?msg='Hello World!')


Expand Down
Binary file modified config.pyc
Binary file not shown.
4 changes: 4 additions & 0 deletions cron.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
cron:
- description: Auto Retweet
url: /CronJobXdTuxBot
schedule: every 3 minutes
timezone: Asia/Shanghai

- description: Auto follow back
url: /AutoFollowBack
Expand Down
4 changes: 2 additions & 2 deletions index.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ def get(self):



application = webapp.WSGIApplication([('/RT', GetList),
application = webapp.WSGIApplication([('/',GetList),
('/RT', GetList),
('/timeline',GetTimeline),
(config.URL_CURWORD, ShowCurrentWord),
(config.URL_MENTIONS, GetMentions),
(config.KEY_FOBACK_ALL, FollowAllNewcomers),
(config.KEY_CRONJOB, CronJobCheck),
Expand Down
Binary file removed template/.index.html.swp
Binary file not shown.
1 change: 1 addition & 0 deletions template/timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
</div>
<div class="tweet-user-block-desc">
{{ status.user.description }}
{{ status.id}}
</div>
</div>
{% endif %}
Expand Down

0 comments on commit e08ef35

Please sign in to comment.