清理你的嘟嘟历史。

cleantoots的Python项目详细描述


清洁剂

Build Status

Cleantoots帮助您删除旧的toots。因为不是我们在社交媒体上说的每件事都应该永远存在。在

配置

初始设置

只有一次

python -m pip install cleantoots
cleantoots config setup  # See the following section for config file options
cleantoots config login

查看和编辑

以后可以使用

^{pr2}$

您可以使用编辑配置文件

cleantoots config edit

这将使用您首选的编辑器(EDITORenv变量)打开配置文件。在

配置选项

# Any key in this section will serve as a default for other sections[DEFAULT]# Toots that have at least this number of boosts won't be deleted.boost_limit=5# Toots that have at least this number of favorites won't be deleted.favorite_limit=5# Toots that are more recent than this number of days won't be deleted.days_count=30# The timezone to use for dates comparisons.timezone=Europe/Paris# Each section represents an account.[Fosstodon]# Your Mastodon server URL.api_base_url=https://fosstodon.org# These files are used to store app information obtained when running `login`.# The files must be different between accounts. Two different files are required per account.app_secret_file=fosstodon_app.secretuser_secret_file=fosstodon_user.secret# IDs of toots you want to protect (never delete).# You can find the toot ID in the URL when viewing a toot.protected_toots=103362008817616000    103361883565013391    103363106195441418# Tags you want to protect (never delete).# Tags are matched case insensitively and are only matched for original toots (not for boosts):# if you boost a toot containing #ScreenshotSunday it won't be protected by this rule.# You MUST omit the `#` part of the tag.protected_tags=100DaysToOffload    screenshotsunday# Another account[Mastodon.social]api_base_url=https://mastodon.socialapp_secret_file=mastodonsocial_app.secretuser_secret_file=mastodonsocial_user.secret# Overriding some defaultsboost_limit=10favorite_limit=30days_count=7

有关当前配置,请参见cleantoots config。在

cleantoots clean  # Defaults to a dry run. Does NOT delete.
cleantoots clean --delete  # Delete without prompt.

添加帐户

cleantoots config edit  # Opens editor so you can add your config
cleantoots config list  # Check your newly added account
cleantoots config login --only-missing  # Store credentials for your newly created account
cleantoots clean --delete

删除帐户

# This deletes stored credentials for accounts described in the main config file.
cleantoots config clear-credentials

# You can then edit the config and remove some accounts:
cleantoots config edit

# Then login again for remaining accounts.
cleantoots config login

测试环境

Cleantoots测试套件运行在python3.6、3.7和3.8上 在最新版本的macOS、Windows和Ubuntu上,正如GitHub Actions所理解的那样。在

看到了吗 the docs 关于“最新”的更多信息。在

灵感

cleantoots背后的想法受到magnusnissel/cleantweets的高度启发。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
用于读取OBS写入的java打开文件   java使用XFire通过ssl使用Web服务   java如何查看幸存者空间中的对象   不使用ActionListener从按钮执行java代码   java仅当用户执行某个操作时,如何清除应用程序的历史记录?   json无法反序列化'java'的实例。lang.Long`out-of-START\u对象标记;在弹簧靴柱上   JavaPOJO到OpenApi定义   java时间戳格式不显示不同的值   java Android:如何从片段切换到主要活动?   用于步进计数器/健身应用程序的java循环进度条   java Log4j更改特定记录器实例的记录器级别   JAVA中实现连接的数据结构   java Mockito静态函数mock   未找到java辅助技术:org。侏儒。可访问性。阿特克拉珀   java仅当列表中没有类似项时才向ArrayList添加项   java如何使用docx4j在word中添加合并字段?