Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

logo

collective.bluesky

PyPI PyPI - Python Version PyPI - Wheel PyPI - License PyPI - Status

PyPI - Plone Versions

Meta Code Style

GitHub contributors GitHub Repo stars

collective.bluesky is a package providing a Plone 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:

pip install collective.bluesky

or add it as a dependency on your package's setup.py

    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 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:

BLUESKY_APPS='[{"host":"bsky.app","handle":"demo","app_password":"1232434323234"}]'

Starting Plone

Now, you can start your local Plone installation with:

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:

    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!

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:

make build

Update translations

make i18n

Format codebase

make format

Run tests

Testing of this package is done with pytest and tox.

Run all tests with:

make test

Run all tests but stop on the first error and open a pdb session:

./bin/tox -e test -- -x --pdb

Run only tests that match TestAppDiscovery:

./bin/tox -e test -- -k TestAppDiscovery

Run only tests that match TestAppDiscovery, but stop on the first error and open a pdb session:

./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

Contributors

  • Érico Andrei, @ericof

Changelog

1.0.0a3 (2023-09-22)

Bug fixes:

  • Fix scale upload for images larger than 1Mb @ericof #4

1.0.0a2 (2023-09-13)

Bug fixes:

  • Implement fallback to posts with more than 300 characters. [@ericof] #1
  • Implement fallback for images larger than 1Mb. [@ericof] #2

1.0.0a1 (2023-08-29)

New features:

  • Initial implementation of collective.bluesky [@ericof] #0

Metadata

Release files for collective.bluesky 1.0.0a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.bluesky 1.0.0a3
File Size Uploaded
collective.bluesky-1.0.0a3.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for collective.bluesky 1.0.0a3
File Interpreter ABI Platform
collective.bluesky-1.0.0a3-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / collective.bluesky-1.0.0a3.tar.gz

Download URL collective.bluesky-1.0.0a3.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
a8fe94188684879b1cdbb8e6ca3b3ee1786c5ee4bfa3286234727ad020c86925
BLAKE2b-256 checksum
How to use checksums
0fd28e6bc95bf375f1b3c8f9c33ded874c9f1326713e313c938c6caa953024e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Release files / collective.bluesky-1.0.0a3-py3-none-any.whl

Download URL collective.bluesky-1.0.0a3-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
395bfdbd40001b00ff55c7c25de6ad7019e8b9b641c6dcb32799ba4fb17f65b3
BLAKE2b-256 checksum
How to use checksums
086ad5099bca54cb97d88080571053831da6fd42107e86b7cd77e4f09ba97f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page