Skip to content

Commit

Permalink
chore: updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Jun 25, 2024
1 parent 9057cb4 commit 598b60d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ MASTODON_INSTANCE="https://mastodon.instance"
MASTODON_USER="username"
BLUESKY_ENDPOINT="https://bsky.social"
BLUESKY_HANDLE="USERNAME.bsky.social"
BLUESKY_PASSWORD="PASSWORD"
BLUESKY_PASSWORD="PASSWORD"
INTERVAL_MINUTES: 5
54 changes: 51 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
# mastodon-to-bluesky
A Node.js script for crossposting from mastodon to bluesky
For more details see: https://maurice-renck.de/hub/tooling/crosspost-from-mastodon-to-bluesky
# Mastodon to Bluesky
#### Crosspost from Mastodon to Bluesky

![GitHub release](https://img.shields.io/github/release/mauricerenck/mastodon-to-bluesky.svg?maxAge=1800) ![License](https://img.shields.io/github/license/mashape/apistatus.svg)

---

This scripts listens to your Mastodon account and crossposts your toots to your Bluesky account. It uses the Mastodon API and the Bluesky API to achieve this. The script is written in Node.js and can be run on your local machine or on a server.

---

## Installation

You can run the script directly using Node.js or you can use the Docker image.

### Node.js

Clone this repository and install the dependencies:

```bash
git clone https://github.com/mauricerenck/mastodon-to-bluesky.git
cd mastodon-to-bluesky
npm install
```

## Configuration

Create a `.env` file in the root directory of the project and add the following variables:

```bash
MASTODON_INSTANCE: 'https://mastodon.instance'
MASTODON_USER: 'username'
BLUESKY_ENDPOINT: 'https://bsky.social'
BLUESKY_HANDLE: 'USERNAME.bsky.social'
BLUESKY_PASSWORD: 'PASSWORD'
INTERVAL_MINUTES: 5
```

You can also set the same variables as environment variables in the `docker-compose.yml` file.

## Usage

To run the script, execute the following command:

```bash
node main.js
```

---

For more details see: https://maurice-renck.de/hub/tooling/crosspost-from-mastodon-to-bluesky
19 changes: 10 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ services:
app:
image: host/mastodon-to-bluesky:latest
container_name: mastodon-to-bluesky
environment:
MASTODON_INSTANCE: 'https://mastodon.instance'
MASTODON_USER: 'username'
BLUESKY_ENDPOINT: 'https://bsky.social'
BLUESKY_HANDLE: 'USERNAME.bsky.social'
BLUESKY_PASSWORD: 'PASSWORD'
INTERVAL_MINUTES: 5
env_file: '.env'
# environment:
# MASTODON_INSTANCE: 'https://mastodon.instance'
# MASTODON_USER: 'username'
# BLUESKY_ENDPOINT: 'https://bsky.social'
# BLUESKY_HANDLE: 'USERNAME.bsky.social'
# BLUESKY_PASSWORD: 'PASSWORD'
# INTERVAL_MINUTES: 5
volumes:
- mastodon-to-bluesky:/usr/src/app/data
restart: unless-stopped

volumes:
mastodon-to-bluesky:
external: true
mastodon-to-bluesky:
external: true

0 comments on commit 598b60d

Please sign in to comment.