Giter VIP home page Giter VIP logo

mastodon-to-bluesky's Introduction

mastodon-to-bluesky

A simple script to post posts from Mastodon instances to Bluesky.

Setup

Requires Python 3.10 or later, a Mastodon account, and a Bluesky account.

  1. On your Mastodon instance, create a list. Then, add yourself to the list - on the web interface, you can do this by clicking on "edit list" on your list, then typing your handle into the search box. Save the list's ID, which can be found at the end of the URL when you view the list on the web interface.
    • You can use any list, technically - the bot will only post your account's posts though.
  2. Still on Mastodon, go into your account settings, then "Development", and create a new application with any name (you can keep the permissions and redirect URI as is). Save the access token.
    • You can narrow down the permissions to read only if you want to be more secure.
  3. On Bluesky, go to your account settings, go to "App Passwords", and create a new app password. Save the app password.
    • You can also use your main password for Bluesky, but it's not recommended.
  4. Clone this repository and install the requirements with pip install -r requirements.txt.
    • It's recommended to use a virtual environment. Popular choices include venv or virtualenv.
  5. Make a file called ".env" in the same directory as the script. Add the following lines to it:
BLUESKY_USERNAME="YOUR_BLUESKY_USERNAME"  # replace with your bluesky username/handle
BLUESKY_PASSWORD="YOUR_BLUESKY_APP_PASSWORD"  # replace with your bluesky app password
MASTODON_INSTANCE="YOUR_MASTODON_INSTANCE"  # replace with your mastodon instance - ie mastodon.social
MASTODON_ACCESS_TOKEN="YOUR_MASTODON_ACCESS_TOKEN" # replace with your mastodon access token
MASTODON_LIST_ID="YOUR_MASTODON_LIST_ID"  # replace with your mastodon list id
  1. Run the script with python main.py. New posts from your Mastodon list should now be posted to Bluesky.
    • You can run the script in the background with nohup python main.py & or use a process manager like pm2 or systemd.

mastodon-to-bluesky's People

Contributors

astreatss avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

bierbo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.