• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

zigg/updatebot: a Mastodon bot for updating you on its feelings

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

zigg/updatebot

开源软件地址(OpenSource Url):

https://github.com/zigg/updatebot

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

updatebot

updatebot is a Mastodon bot that tells you just how it is feeling every day at a set time.

Getting started

Use Pipenv to set up an environment and install dependencies.

Edit the client section in updatebot.ini to set up your bot as a Mastodon client.

The most important thing to change is your api_base_url, unless you're also using botsin.space.

You'll probably also want to set a client_name to identify your bot.

The first time you run your update bot, if it doesn't have the necessary keys, it will register and prompt you for your bot's login details.

Configuration

Configuration for how the bot toots is in the updates section of updatebot.ini.

adverbs specifies where the adverbs.txt file is, which contains all the possible adverbs the bot can use.

morning_hour, evening_hour and timezone specifies what hour the bot will toot on. I invoke updatebot every hour because my server is in UTC; the bot then figures out if it's 8 a.m. or 8 p.m. in Detroit or not to decide whether to toot.

morning_preambles_file and evening_preambles_file are the preambles that will be randomly picked-from depending on whether it's the morning hour or the evening hour.

feeling is how the bot feels.

Running the bot

updatebot doesn't schedule itself. Instead, you can set it up in your crontab.

I have updatebot running in its own Python venv, so my crontab line looks like this:

0 * * * *       cd $HOME/src/updatebot && ./bin/python updatebot ./updatebot.ini

Inspiration

updatebot was inspired by BiBot, but is a brand-new implementation by me, since, at the time, I didn't know it was Misha Fletcher who created it. Since then, I've done a lot of work to try to give it my own personality.

My bi update bot runs on this codebase.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Soapbox / Soapbox FE · GitLab发布时间:2022-08-18
下一篇:
leahoswald/mastodon-statistics: Some simple scripts to collect statistics from m ...发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap