<div align="center"><img alt="logo" src="./docs/_static/images/icon.png" width="70" /></div>
<h1 align="center">collective.bluesky</h1>
<div align="center">
[![PyPI](https://img.shields.io/pypi/v/collective.bluesky)](https://pypi.org/project/collective.bluesky/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/collective.bluesky)](https://pypi.org/project/collective.bluesky/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/collective.bluesky)](https://pypi.org/project/collective.bluesky/)
[![PyPI - License](https://img.shields.io/pypi/l/collective.bluesky)](https://pypi.org/project/collective.bluesky/)
[![PyPI - Status](https://img.shields.io/pypi/status/collective.bluesky)](https://pypi.org/project/collective.bluesky/)
[![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/collective.bluesky)](https://pypi.org/project/collective.bluesky/)
[![Meta](https://github.com/collective/collective.bluesky/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/collective.bluesky/actions/workflows/meta.yml)
![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)
[![GitHub contributors](https://img.shields.io/github/contributors/collective/collective.bluesky)](https://github.com/collective/collective.bluesky)
[![GitHub Repo stars](https://img.shields.io/github/stars/collective/collective.bluesky?style=social)](https://github.com/collective/collective.bluesky)
</div>
**collective.bluesky** is a package providing a [Plone](https://plone.org/) content rules action to post a status to Bluesky.
# Installation
This package supports Plone sites using Volto and ClassicUI.
For proper Volto support, the requirements are:
* plone.restapi >= 8.34.0
* Volto >= 16.10.0
Add **collective.bluesky** to the Plone installation using `pip`:
```bash
pip install collective.bluesky
```
or add it as a dependency on your package's `setup.py`
```python
install_requires = [
"collective.bluesky",
"Plone",
"plone.restapi",
"setuptools",
],
```
## Configuration
### Obtaining an App Password
Before you can use this package, you have to register an App Password on Bluesky.
To do so, log in to your account, visit [App Password](https://bsky.app/settings/app-passwords) and add a new `App Password`.
Go to the newly created application page and copy the value of `Your access token`.
### Configuring Plone
This package is configured via the `BLUESKY_APPS` environment variable which should contain a valid JSON array with your Bluesky Application information.
Each application registration requires the following information:
| Key | Description | Example Value |
| -- | -- | -- |
| host | Hostname of the instance to be used. Default value: `bsky.app` | sandbox.tld |
| handle | Handle used to log in the host (without the @) | demo |
| app_password | Application password | 1232434323234 |
| protocol | Host protocol. Default value: `https` | https |
Using the information above, the environment variable would look like:
```shell
BLUESKY_APPS='[{"host":"bsky.app","handle":"demo","app_password":"1232434323234"}]'
```
### Starting Plone
Now, you can start your local Plone installation with:
```shell
BLUESKY_APPS='[{"host":"bsky.app","handle":"demo","app_password":"1232434323234"}]' make start
```
or, if you are using a `docker compose` configuration, add the new environment variable under the `environment` key:
```yaml
environment:
- BLUESKY_APPS=[{"host":"bsky.app","handle":"demo","app_password":"1232434323234"}]
```
After start-up visit the `Content Rules` Control Panel, and create a new content rule.
No additional configuration is needed for Volto support.
# Contributing
If you want to help with the development (improvement, update, bug-fixing, ...) of `collective.bluesky` this is a great idea!
- [Issue Tracker](https://github.com/collective/collective.bluesky/issues)
- [Source Code](https://github.com/collective/collective.bluesky/)
- [Documentation](https://collective.github.io/collective.bluesky)
We appreciate any contribution and if a release is needed to be done on PyPI, please just contact one of us.
## Local Development
You need a working `python` environment (system, `virtualenv`, `pyenv`, etc) version 3.8 or superior.
Then install the dependencies and a development instance using:
```bash
make build
```
### Update translations
```bash
make i18n
```
### Format codebase
```bash
make format
```
### Run tests
Testing of this package is done with [`pytest`](https://docs.pytest.org/) and [`tox`](https://tox.wiki/).
Run all tests with:
```bash
make test
```
Run all tests but stop on the first error and open a `pdb` session:
```bash
./bin/tox -e test -- -x --pdb
```
Run only tests that match `TestAppDiscovery`:
```bash
./bin/tox -e test -- -k TestAppDiscovery
```
Run only tests that match `TestAppDiscovery`, but stop on the first error and open a `pdb` session:
```bash
./bin/tox -e test -- -k TestAppDiscovery -x --pdb
```
## Translations
This product has been translated into:
- English (Érico Andrei)
- Português do Brasil (Érico Andrei)
# License
The project is licensed under GPLv2.
# One Last Thing
Originally Made in São Paulo, Brazil, with love, by your friends @ Simples Consultoria.
Now maintained by the [Plone Collective](https://github.com/collective)
# Contributors
- Érico Andrei, @ericof
# Changelog
<!--
You should *NOT* be adding new change log entries to this file.
You should create a file in the news directory instead.
For helpful instructions, please see:
https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst
-->
<!-- towncrier release notes start -->
## 1.0.0a3 (2023-09-22)
### Bug fixes:
- Fix scale upload for images larger than 1Mb @ericof [#4](https://github.com/collective/collective.bluesky/issues/4)
## 1.0.0a2 (2023-09-13)
### Bug fixes:
- Implement fallback to posts with more than 300 characters. [@ericof] [#1](https://github.com/collective/collective.bluesky/issues/1)
- Implement fallback for images larger than 1Mb. [@ericof] [#2](https://github.com/collective/collective.bluesky/issues/2)
## 1.0.0a1 (2023-08-29)
### New features:
- Initial implementation of collective.bluesky [@ericof] [#0](https://github.com/collective/collective.bluesky/issues/0)
Raw data
{
"_id": null,
"home_page": "https://pypi.python.org/pypi/collective.bluesky",
"name": "collective.bluesky",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.0",
"maintainer_email": "",
"keywords": "Python Plone Bluesky ContentRules SocialNetwork",
"author": "\u00c9rico Andrei",
"author_email": "ericof@plone.org",
"download_url": "https://files.pythonhosted.org/packages/0f/d2/8e6bc95bf375f1b3c8f9c33ded874c9f1326713e313c938c6caa953024e5/collective.bluesky-1.0.0a3.tar.gz",
"platform": null,
"description": "\n<div align=\"center\"><img alt=\"logo\" src=\"./docs/_static/images/icon.png\" width=\"70\" /></div>\n\n<h1 align=\"center\">collective.bluesky</h1>\n\n<div align=\"center\">\n\n[![PyPI](https://img.shields.io/pypi/v/collective.bluesky)](https://pypi.org/project/collective.bluesky/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/collective.bluesky)](https://pypi.org/project/collective.bluesky/)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/collective.bluesky)](https://pypi.org/project/collective.bluesky/)\n[![PyPI - License](https://img.shields.io/pypi/l/collective.bluesky)](https://pypi.org/project/collective.bluesky/)\n[![PyPI - Status](https://img.shields.io/pypi/status/collective.bluesky)](https://pypi.org/project/collective.bluesky/)\n\n\n[![PyPI - Plone Versions](https://img.shields.io/pypi/frameworkversions/plone/collective.bluesky)](https://pypi.org/project/collective.bluesky/)\n\n[![Meta](https://github.com/collective/collective.bluesky/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/collective.bluesky/actions/workflows/meta.yml)\n![Code Style](https://img.shields.io/badge/Code%20Style-Black-000000)\n\n[![GitHub contributors](https://img.shields.io/github/contributors/collective/collective.bluesky)](https://github.com/collective/collective.bluesky)\n[![GitHub Repo stars](https://img.shields.io/github/stars/collective/collective.bluesky?style=social)](https://github.com/collective/collective.bluesky)\n\n</div>\n\n**collective.bluesky** is a package providing a [Plone](https://plone.org/) content rules action to post a status to Bluesky.\n\n\n# Installation\n\nThis package supports Plone sites using Volto and ClassicUI.\n\nFor proper Volto support, the requirements are:\n\n* plone.restapi >= 8.34.0\n* Volto >= 16.10.0\n\nAdd **collective.bluesky** to the Plone installation using `pip`:\n\n```bash\npip install collective.bluesky\n```\n\nor add it as a dependency on your package's `setup.py`\n\n```python\n install_requires = [\n \"collective.bluesky\",\n \"Plone\",\n \"plone.restapi\",\n \"setuptools\",\n ],\n```\n\n## Configuration\n\n### Obtaining an App Password\nBefore you can use this package, you have to register an App Password on Bluesky.\nTo do so, log in to your account, visit [App Password](https://bsky.app/settings/app-passwords) and add a new `App Password`.\nGo to the newly created application page and copy the value of `Your access token`.\n\n### Configuring Plone\n\nThis package is configured via the `BLUESKY_APPS` environment variable which should contain a valid JSON array with your Bluesky Application information.\n\nEach application registration requires the following information:\n\n| Key | Description | Example Value |\n| -- | -- | -- |\n| host | Hostname of the instance to be used. Default value: `bsky.app` | sandbox.tld |\n| handle | Handle used to log in the host (without the @) | demo |\n| app_password | Application password | 1232434323234 |\n| protocol | Host protocol. Default value: `https` | https |\n\nUsing the information above, the environment variable would look like:\n\n```shell\nBLUESKY_APPS='[{\"host\":\"bsky.app\",\"handle\":\"demo\",\"app_password\":\"1232434323234\"}]'\n```\n\n### Starting Plone\n\nNow, you can start your local Plone installation with:\n\n```shell\nBLUESKY_APPS='[{\"host\":\"bsky.app\",\"handle\":\"demo\",\"app_password\":\"1232434323234\"}]' make start\n```\n\nor, if you are using a `docker compose` configuration, add the new environment variable under the `environment` key:\n\n```yaml\n environment:\n - BLUESKY_APPS=[{\"host\":\"bsky.app\",\"handle\":\"demo\",\"app_password\":\"1232434323234\"}]\n```\n\nAfter start-up visit the `Content Rules` Control Panel, and create a new content rule.\n\nNo additional configuration is needed for Volto support.\n\n# Contributing\n\nIf you want to help with the development (improvement, update, bug-fixing, ...) of `collective.bluesky` this is a great idea!\n\n- [Issue Tracker](https://github.com/collective/collective.bluesky/issues)\n- [Source Code](https://github.com/collective/collective.bluesky/)\n- [Documentation](https://collective.github.io/collective.bluesky)\n\nWe appreciate any contribution and if a release is needed to be done on PyPI, please just contact one of us.\n\n## Local Development\n\nYou need a working `python` environment (system, `virtualenv`, `pyenv`, etc) version 3.8 or superior.\n\nThen install the dependencies and a development instance using:\n\n```bash\nmake build\n```\n### Update translations\n\n```bash\nmake i18n\n```\n\n### Format codebase\n\n```bash\nmake format\n```\n\n### Run tests\n\nTesting of this package is done with [`pytest`](https://docs.pytest.org/) and [`tox`](https://tox.wiki/).\n\nRun all tests with:\n\n```bash\nmake test\n```\n\nRun all tests but stop on the first error and open a `pdb` session:\n\n```bash\n./bin/tox -e test -- -x --pdb\n```\n\nRun only tests that match `TestAppDiscovery`:\n\n```bash\n./bin/tox -e test -- -k TestAppDiscovery\n```\n\nRun only tests that match `TestAppDiscovery`, but stop on the first error and open a `pdb` session:\n\n```bash\n./bin/tox -e test -- -k TestAppDiscovery -x --pdb\n```\n\n## Translations\n\nThis product has been translated into:\n\n- English (\u00c9rico Andrei)\n- Portugu\u00eas do Brasil (\u00c9rico Andrei)\n\n# License\n\nThe project is licensed under GPLv2.\n\n# One Last Thing\n\nOriginally Made in S\u00e3o Paulo, Brazil, with love, by your friends @ Simples Consultoria.\n\nNow maintained by the [Plone Collective](https://github.com/collective)\n\n\n# Contributors\n\n- \u00c9rico Andrei, @ericof\n\n\n# Changelog\n\n<!--\n You should *NOT* be adding new change log entries to this file.\n You should create a file in the news directory instead.\n For helpful instructions, please see:\n https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n-->\n\n<!-- towncrier release notes start -->\n\n## 1.0.0a3 (2023-09-22)\n\n\n### Bug fixes:\n\n- Fix scale upload for images larger than 1Mb @ericof [#4](https://github.com/collective/collective.bluesky/issues/4)\n\n\n## 1.0.0a2 (2023-09-13)\n\n\n### Bug fixes:\n\n- Implement fallback to posts with more than 300 characters. [@ericof] [#1](https://github.com/collective/collective.bluesky/issues/1)\n- Implement fallback for images larger than 1Mb. [@ericof] [#2](https://github.com/collective/collective.bluesky/issues/2)\n\n\n## 1.0.0a1 (2023-08-29)\n\n\n### New features:\n\n- Initial implementation of collective.bluesky [@ericof] [#0](https://github.com/collective/collective.bluesky/issues/0)\n\n\n",
"bugtrack_url": null,
"license": "GPL version 2",
"summary": "Bluesky integration for Plone.",
"version": "1.0.0a3",
"project_urls": {
"Documentation": "https://collective.github.io/collective.bluesky",
"Homepage": "https://pypi.python.org/pypi/collective.bluesky",
"PyPI": "https://pypi.python.org/pypi/collective.bluesky",
"Source": "https://github.com/collective/collective.bluesky",
"Tracker": "https://github.com/collective/collective.bluesky/issues"
},
"split_keywords": [
"python",
"plone",
"bluesky",
"contentrules",
"socialnetwork"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "086ad5099bca54cb97d88080571053831da6fd42107e86b7cd77e4f09ba97f65",
"md5": "b1eb61cb8e942e0647456a99c55319e4",
"sha256": "395bfdbd40001b00ff55c7c25de6ad7019e8b9b641c6dcb32799ba4fb17f65b3"
},
"downloads": -1,
"filename": "collective.bluesky-1.0.0a3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b1eb61cb8e942e0647456a99c55319e4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.0",
"size": 30311,
"upload_time": "2023-09-22T18:13:27",
"upload_time_iso_8601": "2023-09-22T18:13:27.353313Z",
"url": "https://files.pythonhosted.org/packages/08/6a/d5099bca54cb97d88080571053831da6fd42107e86b7cd77e4f09ba97f65/collective.bluesky-1.0.0a3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0fd28e6bc95bf375f1b3c8f9c33ded874c9f1326713e313c938c6caa953024e5",
"md5": "14659b169be4405b88cd46129d4c3eba",
"sha256": "a8fe94188684879b1cdbb8e6ca3b3ee1786c5ee4bfa3286234727ad020c86925"
},
"downloads": -1,
"filename": "collective.bluesky-1.0.0a3.tar.gz",
"has_sig": false,
"md5_digest": "14659b169be4405b88cd46129d4c3eba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.0",
"size": 1589112,
"upload_time": "2023-09-22T18:13:30",
"upload_time_iso_8601": "2023-09-22T18:13:30.089617Z",
"url": "https://files.pythonhosted.org/packages/0f/d2/8e6bc95bf375f1b3c8f9c33ded874c9f1326713e313c938c6caa953024e5/collective.bluesky-1.0.0a3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-22 18:13:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "collective",
"github_project": "collective.bluesky",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "collective.bluesky"
}