Auto-posts social media updates
Project description
autopost
A social media auto-poster for a blog.
Supported sites:
- Twitter (currently untested)
- Mastodon (any instance)
- Reddit (any subreddit)
- Bluesky
Installation
autopost
requires Python 3.11 or newer, and is available on PyPI:
python -m pip install autopost
Usage
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)
Examples
To do anything meaningful with autopost
, you'll need to configure
it. See autopost.example.toml for an example configuration file.
Once configured, you can use autopost
to make a post manually:
$ 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
...where --tags
is optional.
Alternatively, you can use autopost atom
to retrieve a post from an Atom-style
RSS feed:
autopost atom https://example.com/feed.xml
In both cases, you can pass --dry-run
to see what autopost
would post
instead of actually doing it:
$ 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']
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file autopost-0.0.5.tar.gz
.
File metadata
- Download URL: autopost-0.0.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f376da01f9fdb5178f404f1e5ffe31018419901a0afe840ef98c624cff2312 |
|
MD5 | d3721d0458ad563b2726c0e305f8f3c7 |
|
BLAKE2b-256 | 997573c0f1e0c66ee3c4e4764dff9445eacf01f2aae32f92fb837e830a9a4933 |
File details
Details for the file autopost-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: autopost-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcb1b6cd2d4991a831ef0f4afb1f1565b390aab679aad3188cef991317dd3d23 |
|
MD5 | 03facf52f3770e0126f38346c668ed2c |
|
BLAKE2b-256 | a28b131c1d6b454caa9b673246ae435ab16c003f8b10ffbec2edd871c2d70350 |