Contributter Ranking Bot
Project description
contributter-ranking-bot
contributterを使っているユーザーの1日のcontribute数トップ3をメンション付きで自動ツイートするbotです。
Installation
pip install contributter-ranking-bot
# or:
pip install git+https://github.com/eggplants/contributter-ranking-bot
CLI Usage
$ crb -h
usage: crb [-h] [-k PATH] [-d DAY] [-w SEC] [-n N] [-q] [-V]
This command makes Contributter Ranking Bot easier to run.
optional arguments:
-h, --help show this help message and exit
-k PATH, --key PATH key file (default: None)
-d DAY, --day-before DAY n days before (default: 1)
-w SEC, --wait-sec SEC interval of retrieving tweets (default: 10)
-n N, --top-n N top n to tweet (default: 3)
-q, --quiet suppress log print (default: False)
-V, --version show program's version number and exit
$ cat .twitter.key
CONSUMER_KEY="***"
CONSUMER_SECRET="***"
ACCESS_TOKEN="***"
ACCESS_TOKEN_SECRET="***"
$ crb -k .twitter.key
Thu Apr 21 19:26:42 UTC 2022
# Running Bot was successful!
# See at: https://twitter.com/satoch_bot/status/1517223447868448768
{
"created_at": "Thu Apr 21 19:27:13 +0000 2022",
...
}
$ crb -d 5 -n 5 -k .twitter.key # 5 days before, tweet top-five ranking
処理機構
- 昨日の
#contributter_report
のついたツイート内のcontribution数とユーザーIDを取得 - contribution数を集計してランキング化
- ランキング上位3人をメンションしてcontribution数を記載し、自動ツイート
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for contributter-ranking-bot-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | feb8f60fc48afef08c69cd803bb652a65ba306b8fa500adb256e7203322c582e |
|
MD5 | 5bae7a56d14a5180ac9c720bacbacad3 |
|
BLAKE2b-256 | 71079644e081c6b39109241ef15aacfbc1cfc058aaf0339bdbbdcaa5ff4ce1fb |
Close
Hashes for contributter_ranking_bot-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 024a4dc4a6ff7bb44fc1e07af28dade05adb79e6d36f912e293994c6c42acd95 |
|
MD5 | 87a51a60c80eb0602d2585983da82053 |
|
BLAKE2b-256 | 9dfb3fe1f678f2a2e80ad53eff188736e7297bdfdd63c64a2e471e124e06b043 |