Skip to main content

A cross-platform desktop notification system for Bluesky

Project description

Bluesky Notify

A cross-platform desktop notification system for Bluesky. Monitor and receive notifications from your favorite Bluesky accounts.

Version Python Flask License

Features

  • Monitor multiple Bluesky accounts for new posts
  • Desktop notifications support across platforms (macOS, Linux, Windows)
  • Daemon mode for continuous monitoring
  • Web interface for easy account management
  • Email notifications support (requires Mailgun configuration)
  • XDG-compliant configuration storage
  • SQLite database for reliable post tracking
  • Cross-platform compatibility
  • Consistent CLI interface with clear version and configuration information
  • Comprehensive logging system with rotation and separate error logs

Installation

pip install bluesky-notify

To verify the installation:

bluesky-notify --version

Example output:

Bluesky Notify v0.4.0
Config: /Users/username/.local/share/bluesky-notify

A cross-platform desktop notification system for Bluesky. Monitor and receive notifications from your favorite Bluesky accounts.

Usage: bluesky-notify [OPTIONS] COMMAND [ARGS]...

Run 'bluesky-notify start --daemon' to install and run as a system service.

Options:
  --version  Show version and exit
  --help     Show this message and exit.

Commands:
  add       Add a Bluesky account to monitor.
  list      List all monitored Bluesky accounts and their notification...
  remove    Remove a Bluesky account from monitoring.
  settings  View or update application settings.
  start     Start the notification service.
  status    View the current status of the service.
  stop      Stop the notification service.
  toggle    Toggle monitoring status for a Bluesky account.
  update    Update notification preferences for a monitored account.

Configuration

The application uses the XDG Base Directory Specification for storing its data:

  • Configuration: ~/.config/bluesky-notify/
  • Data: ~/.local/share/bluesky-notify/
  • Cache: ~/.cache/bluesky-notify/

Email Notifications (Optional)

To enable email notifications, set the following environment variables:

export MAILGUN_API_KEY='your-api-key'
export MAILGUN_DOMAIN='your-domain'
export MAILGUN_FROM_EMAIL='notifications@yourdomain.com'
export MAILGUN_TO_EMAIL='your-email@example.com'

Usage

Command Help

To see all available commands and options:

bluesky-notify --help

Adding an Account to Monitor

bluesky-notify add username.bsky.social

Note: The handle should be provided without the '@' symbol.

Options:

  • --desktop/--no-desktop: Enable/disable desktop notifications (default: enabled)
  • --email/--no-email: Enable/disable email notifications (default: disabled)

Listing Monitored Accounts

bluesky-notify list

Removing an Account

bluesky-notify remove username.bsky.social

Toggling Account Status

bluesky-notify toggle username.bsky.social

Updating Notification Preferences

bluesky-notify update username.bsky.social --desktop --no-email

Checking Service Status

View the current status of the service:

bluesky-notify status

This will show:

  • Service status (running/not running) and mode (terminal/daemon)
  • Web interface status and URL
  • Data directory location
  • Current configuration

Starting and Stopping the Service

Start the service:

# Run in terminal mode
bluesky-notify start

# Run as system service (daemon mode)
bluesky-notify start --daemon

Stop the service:

bluesky-notify stop

The stop command will automatically detect whether the service is running in terminal or daemon mode and stop it accordingly.

Viewing/Updating Settings

View current settings:

bluesky-notify settings

Update settings:

# Change check interval
bluesky-notify settings --interval 120

# Change log level
bluesky-notify settings --log-level debug

# Change web interface port
bluesky-notify settings --port 8080

Available settings:

  • Check interval (in seconds)
  • Log level (DEBUG, INFO, WARNING, ERROR)
  • Web interface port

Logging

The application uses a comprehensive logging system:

  • Log files are stored in ~/.local/share/bluesky-notify/logs/
  • Two log files are maintained:
    • bluesky-notify.log: General application logs (INFO level and above)
    • bluesky-notify.error.log: Error-specific logs (ERROR level only)
  • Log rotation is enabled:
    • Maximum file size: 1MB
    • Keeps up to 5 backup files
    • Rotated files are named with numerical suffixes (e.g., bluesky-notify.log.1)

Log levels can be configured using the settings command:

bluesky-notify settings --log-level debug  # Set to DEBUG level
bluesky-notify settings --log-level info   # Set to INFO level (default)

Version History

  • 0.4.0: Add web interface to daemon + terminal mode
  • 0.3.0: Add daemon mode, web interface, and improved CLI help text
  • 0.2.7: Fixed CLI output formatting and help text organization
  • 0.2.6: Enhanced CLI interface with consistent version and config display
  • 0.2.5: Improved help text formatting and command output
  • 0.2.4: Added version and config information to all commands
  • 0.2.3: Refined CLI presentation and version display
  • 0.2.0: Initial public release

Development

  1. Clone the repository:
git clone https://github.com/jerdog/bluesky-notify.git
cd bluesky-notify
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Build the package:
python -m build
  1. Install the built package:
pip install dist/bluesky_notify-0.4.0-py3-none-any.whl

Troubleshooting

  1. Version Check

    • Run bluesky-notify --version to verify the installed version
    • Make sure you have the latest version installed
  2. No Notifications

    • Check if desktop notifications are enabled in your system
    • Verify the notification service is running
    • Check logs in ~/.local/share/bluesky-notify/logs/
  3. API Errors

    • Verify Bluesky handles are entered correctly (without '@' symbol)
    • Check your internet connection
    • Ensure the Bluesky API is accessible

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bluesky_notify-0.4.1.tar.gz (108.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bluesky_notify-0.4.1-py3-none-any.whl (108.4 kB view details)

Uploaded Python 3

File details

Details for the file bluesky_notify-0.4.1.tar.gz.

File metadata

  • Download URL: bluesky_notify-0.4.1.tar.gz
  • Upload date:
  • Size: 108.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for bluesky_notify-0.4.1.tar.gz
Algorithm Hash digest
SHA256 4376208e992799e00eeb1db0c6b10570de8f1f29131fdfd6dc421b2007581d73
MD5 456488ffe1ba4658ff065a8f361da1ac
BLAKE2b-256 6a19f922b45dcd94cb89a9728916b9f424f5edb2cc0655f37c4a1acff5ec7953

See more details on using hashes here.

File details

Details for the file bluesky_notify-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: bluesky_notify-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 108.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for bluesky_notify-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4d18921d561fd25299e528aaa4fa5ceeafd1406b4efd5b44fa4259556aa6aa4
MD5 e61a1002d26ba8f3b5b81c33f866ec5b
BLAKE2b-256 8928a686876e3931a394e075a59d8d8ee4ecae7a83f727fb176bacd52643e763

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page