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.10.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autopost-0.0.10-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autopost-0.0.10.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for autopost-0.0.10.tar.gz
Algorithm Hash digest
SHA256 938b39a2a1334b28ed7c8a9a898c1a9982c7bea9b11270505c87b28044e67809
MD5 eb47d1904f4ad3e0891473a6d6f09232
BLAKE2b-256 d0eacc199ea5eb5cfe3a53d74b326a42247d92f6d68750c30a7e79e39fcd9cc7

See more details on using hashes here.

Provenance

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

Publisher: release.yml on woodruffw/autopost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: autopost-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for autopost-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 418fb49229885bd94fb2855e8cac6bdac76a579bf51841d5152237d808513d02
MD5 33ade3e9f0496f1917c509863ce95d43
BLAKE2b-256 de9bd5263f2c67e2db0187a8d437e1f32609f17e09f93cd50d152c5d8e7c813e

See more details on using hashes here.

Provenance

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

Publisher: release.yml on woodruffw/autopost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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