Skip to content

๐Ÿ’• Sending all the love from my ex to my new happy and promisucous social media life

License

Notifications You must be signed in to change notification settings

cuducos/from-my-ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

From my ex

๐Ÿ’• Sending all the love from my ex to my new happy and promiscuous social media life. ๐Ÿ’•

In other words, this app gets the new posts (except replies and reposts) from my ex-social media and posts to the new ones.

If you just wanna post stuff, take a look in cuducos/not-my-ex.

Getting started

Requirements

Configuration

These environment variables are required:

Name Description Example
FROM_MY_EX_USERNAME User handle used in the ex, the blue bird one "cuducos" (not "@cuducos")
FROM_MY_EX_NITTER_INSTANCE A Nitter instance with RSS enabled "https://nitter.d420.de"
FROM_MY_EX_DATABASE_URL A URI to a SQL database, with credentials if needed "db.sqlite3" or "postgres://user:pass@server/db"

Optional

To repost in Bluesky

Name Description Example Default value
FROM_MY_EX_BSKY_AGENT Bluesky instance "https://bsky.social" "https://bsky.social"
FROM_MY_EX_BSKY_EMAIL Email used in Bluesky "cuducos@mailinator.com" None
FROM_MY_EX_BSKY_PASSWORD Password used in Bluesky As created in App Passwords None

Not setting FROM_MY_EX_BSKY_EMAIL or FROM_MY_EX_BSKY_PASSWORD disables Bluesky reposting.

To repost in Mastodon

Name Description Example Default value
FROM_MY_EX_MASTODON_INSTANCE Mastodon instance "https://tech.lgbt" "https://mastodon.social"
FROM_MY_EX_MASTODON_TOKEN Mastodon access token Go to your Settings, Development and then create an app to get the access token. Select the write:statuses and write:media scopes. None

Not setting FROM_MY_EX_MASTODON_TOKEN disables Mastodon reposting.

Usage

$ poetry install
$ poetry run python -m from_my_ex --create-db
$ poetry run python -m from_my_ex

At this time, this will post the oldest content from the RSS of the account.

Optionally, use --limit NUMBER to repost more content at once, e.g. python -m from_my_ex --limit 42

Scheduling

Run this command every 10 min (quicker than that, it will just hit the RSS cache).

Web

There's a web server that runs the repost routine for each HTTP request it receives:

$ poetry run uvicorn from_my_ex.web:app

--port $PORT is optional.

Contributing

The tests include Black, Ruff and isort:

$ poetry run pytest

About

๐Ÿ’• Sending all the love from my ex to my new happy and promisucous social media life

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published