An open API service indexing awesome lists of open source software.

https://github.com/gslin/feed2social

Sync feed to social networks.
https://github.com/gslin/feed2social

bluesky facebook feed plurk rss threads

Last synced: 5 months ago
JSON representation

Sync feed to social networks.

Awesome Lists containing this project

README

          

# feed2social

Sync feed to social networks.

## Platforms are supported

* Bluesky
* Facebook
* Plurk
* Threads
* Twitter

## Config

The `~/.config/feed2social/config.ini` file:

```ini
[default]
bluesky_username = username.bsky.social
bluesky_password = x
facebook_username = username
feed_url = https://abpe.org/@gslin.rss
plurk_app_key = x
plurk_app_secret = x
plurk_token = x
plurk_token_secret = x
threads_access_token = x
threads_user_id = x
twitter_access_token = x
twitter_access_token_secret = x
twitter_api_key = x
twitter_api_key_secret = x
```

The `facebook_username` is used for generating the url `https://www.facebook.com/${facebook_username}`.

## Install

pip install -r requirements.txt
echo "CREATE TABLE entry (entry_id VARCHAR, created_at INT);" | sqlite3 ~/.config/feed2social/feed2bluesky.sqlite3
echo "CREATE TABLE entry (entry_id VARCHAR, created_at INT);" | sqlite3 ~/.config/feed2social/feed2facebook.sqlite3
echo "CREATE TABLE entry (entry_id VARCHAR, created_at INT);" | sqlite3 ~/.config/feed2social/feed2plurk.sqlite3
echo "CREATE TABLE entry (entry_id VARCHAR, created_at INT);" | sqlite3 ~/.config/feed2social/feed2threads.sqlite3
echo "CREATE TABLE entry (entry_id VARCHAR, created_at INT);" | sqlite3 ~/.config/feed2social/feed2twitter.sqlite3

## Run

Just run it periodically (usually with crontab):

```bash
./feed2bluesky.py
./feed2facebook.py
./feed2plurk.py
./feed2threads.py
./feed2twitter.py
```

We also support package manager environment like [pyenv](https://github.com/pyenv/pyenv) or [mise](https://github.com/jdx/mise), via shell script wrappers:

```bash
./feed2bluesky.sh
./feed2facebook.sh
./feed2plurk.sh
./feed2threads.sh
./feed2twitter.sh
```

## Workarounds

Currently `plurk_oauth` requires `distutils`, which has been deprecated in Python 3.10, and has been removed in Python 3.12, so we have added `setuptools` as requirement, which adds `distutils` back (at least for now, not sure how long it will continue to support `distutils` compatibility).

## Notes

If you trace our codebase, you will notice that we have copied many same code across all Python scripts. This is done intentionally, to keep every script runnable independently.

## License

See [LICENSE](LICENSE).