Skip to main content

Auto-posts social media updates

Project description

autopost

CI PyPI version

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

autopost-0.0.8.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

autopost-0.0.8-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file autopost-0.0.8.tar.gz.

File metadata

  • Download URL: autopost-0.0.8.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for autopost-0.0.8.tar.gz
Algorithm Hash digest
SHA256 b8a663babff0286ab44095a3d1365676552c44449049f3056ec6d01ffbdd8456
MD5 e739a67447e95de40eef5d0afba088c9
BLAKE2b-256 d61e0c96e2a6b11ad3513637d7dec13ef12c68a0eaaf84a2322cb5c0b41a6c6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for autopost-0.0.8.tar.gz:

Publisher: release.yml on woodruffw/autopost

Attestations:

File details

Details for the file autopost-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: autopost-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for autopost-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0d1c61614dbfa69a3cc78ba47fda1edbd5d592e2a5d3c87f6e25c960d917639d
MD5 2c654e2ff13e20c65793490f877f9fab
BLAKE2b-256 569c09ccc09015247ab33a15c672ca42705ffce3194e33dd23ab1ea30f431386

See more details on using hashes here.

Provenance

The following attestation bundles were made for autopost-0.0.8-py3-none-any.whl:

Publisher: release.yml on woodruffw/autopost

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page