mastodon-twitter-crosspost

command module
v0.0.0-...-21a94a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: MIT Imports: 1 Imported by: 0

README

Mastodon-Twitter-Crosspost

A lightweight program to crosspost from Mastodon to Twitter, suitable for self-hosting. It will poll the Mastodon instance every minute for new posts and post them to Twitter.

WARNING This is a work in progress with only basic functionality for cross-posting tweets and your own replies.

Getting Started

Prerequisites

Twitter API v1.1 is required for posting media, and v2.0 is required for posting tweets.

Installing
go install github.com/mcartmell/mastodon-twitter-crosspost@latest

Create a .env file with your credentials, for example:

MASTODON_URL=https://mastodon.example.com
MASTODON_ACCOUNT_ID=123456789
TWITTER_OAUTH2_REDIRECT_URI=http://localhost:8888
TWITTER_OAUTH2_CLIENT_ID=123456789
TWITTER_OAUTH2_CLIENT_SECRET=123456789
TWITTER_CONSUMER_KEY="123456789"
TWITTER_CONSUMER_SECRET="123456789"
TWITTER_ACCESS_TOKEN="123456789"
TWITTER_ACCESS_TOKEN_SECRET="123456789"
LISTEN_PORT=8888

Run the program:

mastodon-twitter-crosspost

The program will output a link to authorize API access to your Twitter account. Follow the instructions to complete the authorization.

Features

  • Crossposts from Mastodon to Twitter
  • Supports crossposting own threads
  • Supports images

TODO

This is a work in progress with many missing features:

  • Support for videos
  • Support for content warnings

Deployment

There is a Dockerfile included for deployment, intended for self-hosting with minimal memory usage.

License

This project is licensed under the MIT license, see the LICENSE file for details.

Documentation

Overview

Package main is the entry point for the application.

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL