Read-only mirror of https://github.com/DSI-VD/instagram2pixelfed — Canton de Vaud. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-08-29 10:18:18 +02:00
.github/workflows chore: add unit test ci action 2023-08-29 07:25:40 +02:00
src/main initial: cross-posting script and workflow setup 2023-08-28 16:40:04 +02:00
.gitignore initial: cross-posting script and workflow setup 2023-08-28 16:40:04 +02:00
LICENSE Initial commit 2023-08-23 11:28:41 +02:00
pom.xml chore: fix example properties and disable deploy phase in release:perform 2023-08-29 10:18:18 +02:00
README.md chore: fix example properties and disable deploy phase in release:perform 2023-08-29 10:18:18 +02:00

instagram2pixelfed - Instagram cross-posting tool

Command-line runner for cross-posting instagram posts to any Mastodon and Pixelfed.

How to use

A docker image is provided and can be setup to run periodically depending on your needs.

docker run ghcr.io/dsi-vd/instagram2fedi:<tag> --env-file .env

At least three environment variables need to be defined for the application to run, INSTAGRAM_TARGET_USERNAME, MASTODON_INSTANCE and MASTODON_ACCESS_TOKEN.

INSTAGRAM_TARGET_USERNAME is the username of the Instagram account you want to cross-post from.

MASTODON_INSTANCE is the instance you want to cross-post to.

MASTODON_ACCESS_TOKEN is the access token you can get from your Mastodon instance.

Other variables

INSTAGRAM_POST_COUNT is the number of posts to fetch from Instagram. Defaults to 5.

MASTODON_MAX_CAROUSEL_SIZE is the maximum number of images in a single post. Use this if your instance restricts this. Defaults to 4.

MASTODON_CONTENT_LANGUAGE is the ISO-639 code for the language of the content you are posting. Defaults to fr.

MASTODON_CACHE_FILE is the path to the cache file where this script saves a reference to the posts that have already been send. Defaults to /tmp/mastodon.cache.

Configuration

# Instagram
INSTAGRAM_TARGET_USERNAME=account_name
INSTAGRAM_POST_COUNT=5

# Mastodon
MASTODON_INSTANCE=https://pixelfed.social/
MASTODON_ACCESS_TOKEN=jwt_token
MASTODON_MAX_CAROUSEL_SIZE=4
MASTODON_CONTENT_LANGUAGE=fr
MASTODON_CACHE_FILE=persistent/mastodon.cache