Skip to content

Post the same message to Twitter ๐Ÿฆœ, Hachyderm ๐Ÿ˜, and Bluesky๐ŸŒค๏ธ.

License

Notifications You must be signed in to change notification settings

goingforbrooke/yappily

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘… Yappily ๐Ÿ˜

Post the same message to Twitter ๐Ÿฆœ, Hachyderm ๐Ÿ˜, and Bluesky๐ŸŒค๏ธ.

Installation

Compatibility:

  • MacOS: โœ…
  • *nix: ๐Ÿคท๐Ÿผโ€โ™€๏ธ (probably works)
  • Windows: โŒ
  1. Clone this repo over HTTPS or SSH.

Clone over HTTPS:

git clone https://github.com/goingforbrooke/yappily.git

Clone with SSH:

git clone git@github.com:goingforbrooke/yappily.git
  1. Get credentials.

You need to get API keys from Twitter, Hachyderm, and Bluesky.

Paste each one into their corresponding text files at the paths noted below.

The *_creds already exist for your convenience.

Each site needs a different set of credentials:

  • Twitter/X
    • requires a "Developer Portal" account
      • (different from your main account)
      • setup
        • set up for "User Authentication"
        • Type of App: "Web App, Automated App, or Bot"
        • callback uri: up to you, but we won't be using it
        • website url: your website's URL
    • required keys
      • consumer key
        • sometimes known as "API Key" in "Projects and Apps"
        • create yappily/twitter_creds/api_key.txt
      • consumer secret
        • sometimes known as "API Key" in "Projects and Apps."
        • create yappily/twitter_creds/api_key_secret.txt
      • access token
        • create yappily/twitter_creds/access_token.txt
      • access token secret
        • create yappily/twitter_creds/access_token_secret.txt
  • Hachyderm
    • hachyderm.io/home
    • Development Tab
    • "New Application"
    • permissions
      • โ˜‘๏ธ write:statuses: publish posts
    • required keys
      • client ID
        • also known as "Client Key" on the "Development โžก๏ธ Application" page
        • create yappily/hachyderm_creds/client_id.txt
      • client secret
        • create yappily/hachyderm_creds/client_secret.txt
      • access token
        • also known as "Your access token" on the "Development โžก๏ธ Application" page
        • create yappily/hachyderm_creds/access_token.txt
  • Bluesky
    • "Settings"
    • "Privacy and Security"
    • "App passwords"
    • "Add App Password"
      • don't check "Allow access to your direct messages"
    • necessary keys
      • username
        • should be in the format your.username.bsky.social
        • create yappily/bluesky_creds/bluesky_username.txt
      • password
        • create yappily/bluesky_creds/bluesky_password.txt

Caution

Twitter/X's free tier has very low limits. As of 25-1-26, you get 100 posts each month, which may be insufficient for profific posters.

  1. Install Dependencies

Tip

Zsh users can run Yappily from anywhere by adding this file as yapply to ~/bin:

#!/bin/zsh
uv run ~/path/to/where/you/clone/repos/yappily/main.py "$@"

Install with uv

This isn't necessary for uv run, but is included here for those who would like to set up a virtual environment.

Install with pip

pip install -r requirements.txt

Usage

You can run Yappily with any requirements.txt-friendly project manager, but we recommenduv

Run as uv Script

Use uv run:

uv run main.py "<some_awesome_text>"`

Surrounding the post text is optional, but recommended. It prevents your shell from interpreting special characters. For example, the ' in uv run main.py Yappily's awesome will cause issues in zsh. Using uv run main.py "Yappily's awesome" instead.

Example:

uv run main.py "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"
๐Ÿ‘… Yapping "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"
๐Ÿฆœ Tweeted on X/Twitter: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
๐Ÿ˜ Posted to Hachyderm: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
๐ŸŒค๏ธ Posted to Bluesky: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
โœ… Done

Run with python

This works the same as the uv run, but replace uv run with python.

Important

Install dependencies and/or activate a virtual environment first.

python main.py
python main.py "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"
๐Ÿ‘… Yapping "using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy"
๐Ÿฆœ Tweeted on X/Twitter: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
๐Ÿ˜ Posted to Hachyderm: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
๐ŸŒค๏ธ Posted to Bluesky: using QR codes to sign into Slack workspaces on mobile brings me such unbridled joy
โœ… Done

Future

  • post to Insta Threads ๐Ÿงต
  • allow posting to fewer than all sites ๐Ÿ”ง
    • right now, it fails if you don't provide credentials for each one
  • RIIW (Rewrite in Rust) ๐Ÿฆ€
  • make mobile app ๐Ÿคณ๐Ÿป
  • use oAuth for credentials? ๐Ÿ”
  • add image uploads ๐Ÿ“ธ
    • aspect ratio cropping would be nice
  • parallel posting ๐ŸŽ๏ธ
  • post to YouTube communities ๐Ÿ“ฝ๏ธ
  • allow threads? ๐Ÿงต
  • add logging ๐Ÿชต
  • slick packaging ๐Ÿ“ฆ
  • collect stats ๐Ÿ“ˆ
    • 30 day averages in terminal
    • matplotlib graphs in webpage

Contributing

Updating Dependencies

Dependencies are tracked in three locations:

  1. uv'spyproject.toml
  • source of truth
  • created by uv init
  1. inline script metadata dependencies (at the top of main.py)
  • fuels our preferred way to execute Yappily (with uv run main.py`)
  1. requirements.txt
  • for compatibility

Important

Update requirements.txt with the latest from uv:

uv export --format requirements-txt > requirements.txt

License

MIT

About

Post the same message to Twitter ๐Ÿฆœ, Hachyderm ๐Ÿ˜, and Bluesky๐ŸŒค๏ธ.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages