Skip to content

toneji/snufkin_tootbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snufkin_tootbot

スナフキンが名言をMastodonにtootします

【動作確認】
macOS 10.13.3 High Sierra
Python 3.6.4

【下準備】
以下のコマンドで、Mastodon APIをインストールしてください。
pip install Mastodon.py
(うまくいかない場合は、sudo pip3 install Mastodon.pyで)

【セットアップ】
setup.pyに「インスタンス先」「ログインメールアドレス」「パスワード」を書き込み、実行。
python3.6 setup.py

cred.txtとauth.txtが作成されるので、それを既存のものと入れ替える。

【実行】
snufkin_toot.pyの「インスタンス」を編集してから、以下を実行。
python3.6 snufkin_toot.py

これで、tool_list.txtの中の名言をランダムにツゥートする。

【発展】
名言を増やしたい場合は、tool_list.txtに付け加える。その場合、snufkin_toot.pyのramdom関数を編集することを忘れずに。
自動化したい場合はHerokuを使う方法もあり。

【参考】
このプログラムは以下のサイトを参考にしました。ありがとうございます。
[Python]Mastodon botを作ってトゥート!してみた!!
https://routecompass.net/mastodon/#i-3
【Mastodon bot】20%の確率で性器を露出するドラえもん
https://routecompass.net/mastodon-bot/#i-5

About

スナフキンが名言をMastodonにtootします

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages