自动发布社交媒体更新
项目描述
自动发布
博客的社交媒体自动发布器。
支持的网站
- Twitter(目前未测试)
- Mastodon(任何实例)
- Reddit(任何subreddit)
- Bluesky
安装
自动发布
需要 Python 3.11 或更高版本,并在 PyPI 上提供
python -m pip install autopost
使用方法
usage: autopost [-h] [-V] [-v] [--dry-run] [--config-file CONFIG_FILE] {manual,atom} ...
auto-posts social media updates
positional arguments:
{manual,atom}
manual auto-post manually
atom auto-post from an Atom RSS feed
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
-v, --verbose be more verbose while running (default: False)
--dry-run perform a dry-run (default: False)
--config-file CONFIG_FILE
the file to load for configuration (default: ./autopost.toml)
示例
要使用 自动发布
做任何有意义的事情,您需要对其进行配置。请参阅 autopost.example.toml 以获取示例配置文件。
配置完成后,您可以使用 自动发布
手动发布帖子
$ autopost manual "test" --url "https://example.com" --tags foo bar
🎉 reddit:/r/enosuchblog: https://reddit.com/r/enosuchblog/comments/zldk8y/test/
🎉 mastodon:@yossarian@infosec.exchange: https://infosec.exchange/@yossarian/109509443715725349
...其中 --tags
是可选的。
或者,您可以使用 自动发布 atom
从 Atom 风格的 RSS 源检索帖子
autopost atom https://example.com/feed.xml
在这两种情况下,您可以通过传递 --dry-run
来查看 自动发布
会 发布什么,而不是实际执行操作
$ autopost --dry-run atom https://blog.yossarian.net/feed.xml
dry run: would have posted Modernizing my 1980s sound system with URL:
https://blog.yossarian.net/2022/11/07/Modernizing-my-1980s-sound-system and tags: ['howto', 'workflow', 'music']
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
autopost-0.0.7.tar.gz (9.7 kB 查看哈希值)
构建分发
autopost-0.0.7-py3-none-any.whl (10.7 kB 查看哈希值)
关闭
autopost-0.0.7.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 59675526f067faaefcc11b2b9879fabe5062ef2a8a26e3e79c8df177316af11b |
|
MD5 | c17a631bf004cf2a4d693d0df1c1d84a |
|
BLAKE2b-256 | 946ef9235291f6830de339a89614b094261c916b782c68f68011e5ff3d729269 |
关闭
autopost-0.0.7-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b7b8b874bb7198939ca52025eeb9b83db089f1f591b6371de9f67a801821ec15 |
|
MD5 | c36e035404e87a3e7edc822ddfc2d1d2 |
|
BLAKE2b-256 | 3a6896628690d44ced97fc076b6e333180637540269e0166d1790c5f33a6020b |