# Barkr
**Barkr**[^1] is a social media cross-posting tool written in Python: set it up and never worry about manually posting the same message to multiple channels ever again!
With **Barkr** you can setup a series of channels (e.g. social media accounts) to read messages from and / or post messages to. You can mix and match read / write modes, and add multiple accounts of the same type of channel as well without worrying that the same message will be re-posted to a channel it comes from.
Note that **Barkr** is limited to text posts only. Want to see that change? Start a discussion on a new issue!
[^1]: "Barkr" (missing "e") as in "entity that barks". See: [dogs](https://en.wikipedia.org/wiki/Dog).
## Motivation
I wrote **Barkr** for a personal use case after noting how much fragmentation there currently is (as of 2023) in the social media space, as a way to reduce the cost of engaging with multiple social media platforms, and also as a (very simple) way to practice using threads in Python.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `barkr`.
```bash
pip install barkr
```
## Usage
Create a Python script and specify all the channels you want to use. Channel connections are present in the [`barkr.connections`](./barkr/connections/) module.
A simple script showcasing how to set up three Mastodon connections with multiple modes that can run in the background is outlined below:
```python
from barkr.main import Barkr
from barkr.connections.base import ConnectionModes
from barkr.connections.mastodon import MastodonConnection
barkr = Barkr(
[
# Barkr will read new messages posted by this account, and queue them to
# other accounts on write mode, but will not post anything to it.
MastodonConnection(
"Read only connection",
[ConnectionModes.READ],
"<ACCESS TOKEN HERE>",
"<INSTANCE URL HERE>",
),
# Barkr will write queued messages to this account, but will not read anything
# new posted to this account or queue anything from this account to other ones
MastodonConnection(
"Write only connection",
[ConnectionModes.WRITE],
"<ACCESS TOKEN HERE>",
"<INSTANCE URL HERE>",
),
# Barkr will read new messages from this account to be queued onto others, and will
# post new messages from other channels into this one as well.
MastodonConnection(
"R/W connection",
[ConnectionModes.READ, ConnectionModes.WRITE],
"<ACCESS TOKEN HERE>",
"<INSTANCE URL HERE>",
),
]
)
barkr.start()
```
Always keep in mind proper secret management practices when using Barkr: instead of hardcoding access tokens / cookies / user and passwords, use tools like environment variables, `dotenv` or other secret managers!
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Contributions for issues that are already open by maintainers are welcome and encouraged.
Please make sure to update tests as appropriate; a minimum coverage of 80% is expected (and enforced by Github Actions!).
## License
This project is licensed under the [GNU Affero General Public License v3.0](./LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/aitorres/barkr",
"name": "barkr",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "",
"keywords": "python,cli,social media,crossposting,mastodon,fediverse,twitter",
"author": "Andr\u00e9s Ignacio Torres",
"author_email": "dev@aitorres.com",
"download_url": "https://files.pythonhosted.org/packages/4a/5d/b98fd693e78797b25b2bfef0b22c608640f5f5b202dcf005d45452a81983/barkr-0.1.2.tar.gz",
"platform": null,
"description": "# Barkr\n\n**Barkr**[^1] is a social media cross-posting tool written in Python: set it up and never worry about manually posting the same message to multiple channels ever again!\n\nWith **Barkr** you can setup a series of channels (e.g. social media accounts) to read messages from and / or post messages to. You can mix and match read / write modes, and add multiple accounts of the same type of channel as well without worrying that the same message will be re-posted to a channel it comes from.\n\nNote that **Barkr** is limited to text posts only. Want to see that change? Start a discussion on a new issue!\n\n[^1]: \"Barkr\" (missing \"e\") as in \"entity that barks\". See: [dogs](https://en.wikipedia.org/wiki/Dog).\n\n## Motivation\n\nI wrote **Barkr** for a personal use case after noting how much fragmentation there currently is (as of 2023) in the social media space, as a way to reduce the cost of engaging with multiple social media platforms, and also as a (very simple) way to practice using threads in Python.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install `barkr`.\n\n```bash\npip install barkr\n```\n\n## Usage\n\nCreate a Python script and specify all the channels you want to use. Channel connections are present in the [`barkr.connections`](./barkr/connections/) module.\n\nA simple script showcasing how to set up three Mastodon connections with multiple modes that can run in the background is outlined below:\n\n```python\nfrom barkr.main import Barkr\nfrom barkr.connections.base import ConnectionModes\nfrom barkr.connections.mastodon import MastodonConnection\n\nbarkr = Barkr(\n [\n # Barkr will read new messages posted by this account, and queue them to\n # other accounts on write mode, but will not post anything to it.\n MastodonConnection(\n \"Read only connection\",\n [ConnectionModes.READ],\n \"<ACCESS TOKEN HERE>\",\n \"<INSTANCE URL HERE>\",\n ),\n # Barkr will write queued messages to this account, but will not read anything\n # new posted to this account or queue anything from this account to other ones\n MastodonConnection(\n \"Write only connection\",\n [ConnectionModes.WRITE],\n \"<ACCESS TOKEN HERE>\",\n \"<INSTANCE URL HERE>\",\n ),\n # Barkr will read new messages from this account to be queued onto others, and will\n # post new messages from other channels into this one as well.\n MastodonConnection(\n \"R/W connection\",\n [ConnectionModes.READ, ConnectionModes.WRITE],\n \"<ACCESS TOKEN HERE>\",\n \"<INSTANCE URL HERE>\",\n ),\n ]\n)\nbarkr.start()\n```\n\nAlways keep in mind proper secret management practices when using Barkr: instead of hardcoding access tokens / cookies / user and passwords, use tools like environment variables, `dotenv` or other secret managers!\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Contributions for issues that are already open by maintainers are welcome and encouraged.\n\nPlease make sure to update tests as appropriate; a minimum coverage of 80% is expected (and enforced by Github Actions!).\n\n## License\n\nThis project is licensed under the [GNU Affero General Public License v3.0](./LICENSE).\n",
"bugtrack_url": null,
"license": "",
"summary": "Yet another cross-posting tool in Python",
"version": "0.1.2",
"project_urls": {
"Bug Tracker": "https://github.com/aitorres/barkr/issues",
"Change Log": "https://github.com/aitorres/barkr/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/aitorres/barkr",
"Repository": "https://github.com/aitorres/barkr"
},
"split_keywords": [
"python",
"cli",
"social media",
"crossposting",
"mastodon",
"fediverse",
"twitter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8f3ec7eaaf07c8297d60e0c4377a83f448c9438db4ef859abe89a09b222a7e23",
"md5": "c995d3bc332daf4ef40bc08283f13e0a",
"sha256": "e02e45ec3534ecbf268befedcbdd563a26089890b59c20433561ace19ae7a1c1"
},
"downloads": -1,
"filename": "barkr-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c995d3bc332daf4ef40bc08283f13e0a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 22145,
"upload_time": "2023-09-10T01:18:03",
"upload_time_iso_8601": "2023-09-10T01:18:03.122131Z",
"url": "https://files.pythonhosted.org/packages/8f/3e/c7eaaf07c8297d60e0c4377a83f448c9438db4ef859abe89a09b222a7e23/barkr-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4a5db98fd693e78797b25b2bfef0b22c608640f5f5b202dcf005d45452a81983",
"md5": "797360fafb09bb47cf86a6ba8f46b9b2",
"sha256": "5d1cadcbeab836c1eb12a327c3ef0d112b3d292d1143881c253db88f278d2c6b"
},
"downloads": -1,
"filename": "barkr-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "797360fafb09bb47cf86a6ba8f46b9b2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 20358,
"upload_time": "2023-09-10T01:18:04",
"upload_time_iso_8601": "2023-09-10T01:18:04.967260Z",
"url": "https://files.pythonhosted.org/packages/4a/5d/b98fd693e78797b25b2bfef0b22c608640f5f5b202dcf005d45452a81983/barkr-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-10 01:18:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aitorres",
"github_project": "barkr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "barkr"
}