Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/molly/w3igg-crossposter

Automate crossposting web3isgoinggreat.com posts to social media
https://github.com/molly/w3igg-crossposter

bluesky crossposter instagram mastodon social-media twitter

Last synced: about 3 hours ago
JSON representation

Automate crossposting web3isgoinggreat.com posts to social media

Awesome Lists containing this project

README

        

# w3igg-crossposter

Automate crossposting web3isgoinggreat.com posts to social media. The tool captures a screenshot of the specified post,
splits it into up to three segments if the post is long, and then posts to Twitter, Mastodon, Bluesky, Instagram,
and/or Threads.

## Usage

Install: Clone the repository, then run `pip install -r requirements.txt`.

Example call: `crossposter.py 2023-05-01-0`

Call the script with the numerical ID (`YYYY-MM-DD-INCREMENT`) of the entry to post. The script also takes several
optional flags:

- `--no-confirm`: Skip the confirmation step, which previews the post text and prompts you to check the screenshot(s)
that will be posted
- `--use-prev`: Use screenshots and post information stored from a past run
- `--debug`: Show more verbose debug messages

Mutually exclusive optional flags:

- `--tweet`: Only post to Twitter
- `--toot`: Only post to Mastodon
- `--skeet`: Only post to Bluesky
- `--insta`: Only post to Instagram
- `--threads`: Only post to Threads

## Secrets

The script requires a `secrets.py` file with the format:

```
TWITTER_API_KEY = ""
TWITTER_API_KEY_SECRET = ""
TWITTER_ACCESS_TOKEN = ""
TWITTER_ACCESS_TOKEN_SECRET = ""

MASTODON_EMAIL = ""
MASTODON_PASSWORD = ""

BLUESKY_USERNAME = ""
BLUESKY_PASSWORD = ""

INSTAGRAM_USERNAME = ""
INSTAGRAM_PASSWORD = ""
```

It also requires a `mastodon.secret` file generated via [this
process](https://mastodonpy.readthedocs.io/en/stable/#usage), and a `gcp-secret.secret` GCP Service Account key file for
a Service Account with Cloud Functions Invoker access to the `addSocialPostIds` cloud function.

Posting on Threads uses the same credentials as Instagram.