barkr


Namebarkr JSON
Version 0.8.6 PyPI version JSON
download
home_pageNone
SummaryYet another cross-posting tool in Python
upload_time2025-03-09 07:57:24
maintainerNone
docs_urlNone
authorAndrés Ignacio Torres
requires_python<3.14,>=3.9.2
licenseNone
keywords python cli social media crossposting mastodon fediverse twitter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 import (
    ConnectionMode,
    BlueskyConnection,
    DiscordConnection,
    MastodonConnection,
    RSSConnection,
    TelegramConnection,
    TwitterConnection,
)

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",
            [ConnectionMode.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.
        DiscordConnection(
            "Write only connection",
            [ConnectionMode.WRITE],
            "<BOT TOKEN ID HERE>",
            "<CHANNEL ID 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.
        BlueskyConnection(
            "R/W connection",
            [ConnectionMode.READ, ConnectionMode.WRITE],
            "<BLUESKY HANDLE HERE>",
            "<PASSWORD / APP PASSWORD HERE>",
        ),
        # Another example using Twitter -- note that the TwitterConnection only
        # supports write-only mode through the Twitter V2 API
        TwitterConnection(
            "Write only Twitter Connection",
            [ConnectionMode.WRITE],
            "<CONSUMER KEY HERE>",
            "<CONSUMER SECRET HERE>",
            "<ACCESS KEY HERE>",
            "<ACCESS SECRET HERE>",
            "<BEARER TOKEN HERE>",
        ),
        # One more, showcasing a Telegram write-only connection
        TelegramConnection(
            "Write only Telegram connection",
            [ConnectionMode.WRITE],
            "<TELEGRAM BOT TOKEN HERE>",
            "<TELEGRAM CHAT / CHANNEL ID HERE>",
        ),
        # You can also read from an RSS feed!
        RSSConnection(
            "Read only RSS connection",
            [ConnectionMode.READ],
            "<RSS FEED 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": null,
    "name": "barkr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.9.2",
    "maintainer_email": null,
    "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/89/9d/63bc624bf8e22ec3bb6cafd4d57c79bf6d996e11abc39980e89ccd1275ff/barkr-0.8.6.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\n\nfrom barkr.connections import (\n    ConnectionMode,\n    BlueskyConnection,\n    DiscordConnection,\n    MastodonConnection,\n    RSSConnection,\n    TelegramConnection,\n    TwitterConnection,\n)\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            [ConnectionMode.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        DiscordConnection(\n            \"Write only connection\",\n            [ConnectionMode.WRITE],\n            \"<BOT TOKEN ID HERE>\",\n            \"<CHANNEL ID 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        BlueskyConnection(\n            \"R/W connection\",\n            [ConnectionMode.READ, ConnectionMode.WRITE],\n            \"<BLUESKY HANDLE HERE>\",\n            \"<PASSWORD / APP PASSWORD HERE>\",\n        ),\n        # Another example using Twitter -- note that the TwitterConnection only\n        # supports write-only mode through the Twitter V2 API\n        TwitterConnection(\n            \"Write only Twitter Connection\",\n            [ConnectionMode.WRITE],\n            \"<CONSUMER KEY HERE>\",\n            \"<CONSUMER SECRET HERE>\",\n            \"<ACCESS KEY HERE>\",\n            \"<ACCESS SECRET HERE>\",\n            \"<BEARER TOKEN HERE>\",\n        ),\n        # One more, showcasing a Telegram write-only connection\n        TelegramConnection(\n            \"Write only Telegram connection\",\n            [ConnectionMode.WRITE],\n            \"<TELEGRAM BOT TOKEN HERE>\",\n            \"<TELEGRAM CHAT / CHANNEL ID HERE>\",\n        ),\n        # You can also read from an RSS feed!\n        RSSConnection(\n            \"Read only RSS connection\",\n            [ConnectionMode.READ],\n            \"<RSS FEED URL HERE>\"\n        ),\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\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Yet another cross-posting tool in Python",
    "version": "0.8.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/aitorres/barkr/issues",
        "Change Log": "https://github.com/aitorres/barkr/blob/main/CHANGELOG.md",
        "Repository": "https://github.com/aitorres/barkr"
    },
    "split_keywords": [
        "python",
        " cli",
        " social media",
        " crossposting",
        " mastodon",
        " fediverse",
        " twitter"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e03d9ef4d652ab98921c379c4bed27360394f03be55ff8166d89c568b28a844c",
                "md5": "2dee341b0a418d6a87573b2dc9068e24",
                "sha256": "033c457551028154c273794f0834564489869354fd9275c5ffec4756243bd388"
            },
            "downloads": -1,
            "filename": "barkr-0.8.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2dee341b0a418d6a87573b2dc9068e24",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.9.2",
            "size": 28966,
            "upload_time": "2025-03-09T07:57:23",
            "upload_time_iso_8601": "2025-03-09T07:57:23.583850Z",
            "url": "https://files.pythonhosted.org/packages/e0/3d/9ef4d652ab98921c379c4bed27360394f03be55ff8166d89c568b28a844c/barkr-0.8.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "899d63bc624bf8e22ec3bb6cafd4d57c79bf6d996e11abc39980e89ccd1275ff",
                "md5": "6d9cea37a43bc79cd592923c784506c3",
                "sha256": "8b49c0c256dad9b2a3a9a75ed6d2adfc4f6763bbb0b22078b28a90a39a47da12"
            },
            "downloads": -1,
            "filename": "barkr-0.8.6.tar.gz",
            "has_sig": false,
            "md5_digest": "6d9cea37a43bc79cd592923c784506c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.9.2",
            "size": 24306,
            "upload_time": "2025-03-09T07:57:24",
            "upload_time_iso_8601": "2025-03-09T07:57:24.529066Z",
            "url": "https://files.pythonhosted.org/packages/89/9d/63bc624bf8e22ec3bb6cafd4d57c79bf6d996e11abc39980e89ccd1275ff/barkr-0.8.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-09 07:57:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aitorres",
    "github_project": "barkr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "barkr"
}
        
Elapsed time: 0.54487s