catbot

make cats
授权协议 AGPL-3.0 License
开发语言 Python
所属分类 应用工具、 IM/聊天/语音工具
软件类型 开源软件
地区 不详
投 递 者 施子民
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

catbot

a twitter and mastodon bot for node. tweets and toots very good friends.

some cats

more cats

you can run it on your computer or remix it into something new! you'll need nodeand yarn (and git) installed. then run:

git clone https://github.com/lostfictions/catbot
cd catbot
yarn install
yarn dev

in a server environment, this bot can be run withdocker for an easier time. (i recommenddokku if you're looking for a nice way to develop and hostbots.)

the bot needs environment variables if you want it to do stuff:

  • MASTODON_TOKEN: a Mastodon user API token
  • TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_ACCESS_KEY, andTWITTER_ACCESS_SECRET: you need all of these to make a tweet.
  • DATA_DIR: the directory in which to search for cat parts and store data onwhich words have been used recently. (default: 'data', already providedlocally)
  • CRON_RULE: the interval between each post, in crontab format. (default:every four hours)

additionally, MASTODON_SERVER (hardcoded in src/env.ts) controlsthe mastodon instance to which API calls should be made (usually where the botuser lives.)

catbot uses the envalid package which in turnwraps dotenv, so you can alternately stickany of the above environment variables in a file named .env in the projectroot. (it's gitignored, so there's no risk of accidentally committing privateAPI tokens you put in there.)

more bots?

相关阅读

相关文章

相关问答

相关文档