rockiscope

command module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: MIT Imports: 9 Imported by: 0

README ยถ

โšพ Rockiscope

test coverage Go Report Card Release

A Bluesky bot that posts daily horoscopes and win/loss predictions for the Colorado Rockies โ€” a team that has given its fans almost nothing but pain since 2018, yet here we are, building software for them.

Born on July 5, 1991, the Rockies are a Cancer. Every game day, Rockiscope scrapes the daily Cancer horoscope, pulls live stats from the MLB API, runs everything through a prediction engine where the stars get the final say, and posts the result to Bluesky โ€” one hour before first pitch.

On off-days, it posts the horoscope with a season stats summary because even when they're not playing, you're still thinking about them. ๐Ÿ”ฎ

๐Ÿง  The Prediction Engine

Real stats provide the foundation, but the horoscope tips the scales. The engine weighs multiple factors and learns from its mistakes over time:

Factor Starting Weight What it uses
Team win rate 30% Season record from MLB standings
Pitcher matchup 30% ERA + WHIP: our starter vs theirs
Head-to-head 15% Season series record vs today's opponent
Home/away split 10% How we play at home vs on the road
Streak momentum 5% Current W/L streak
๐Ÿ”ฎ Horoscope 10% The stars speak via SHA-256 hash of the daily reading
๐ŸŽฏ Dynamic Weights

The prediction engine learns from its mistakes. After each game:

  1. Records the prediction + actual result to prediction_history.json
  2. Calculates which factors "pointed" the right direction over the last 10 games
  3. Adjusts factor weights ยฑ3% toward better-performing factors
  4. Clamps weights to prevent any single factor from dominating (>45%) or disappearing (<2%)

Weights start at the values above but shift over time based on what's actually predicting correctly. On first run, the bot starts fresh โ€” weights adjust as the season progresses. After 10+ games, the model begins dynamically optimizing.

๐Ÿ”„ Follow-up Posts

After each game, Rockiscope posts a follow-up reply with the result:

  • Correct prediction:
๐ŸŒ™ Planets aligned. Opponent declined.
๐Ÿ“Š Rockies W | 4-3 | Season: 7/10 correct
  • Wrong:
๐Ÿ”ฎ Retrograde strikes again. So did the opponent.
๐Ÿ“Š Rockies L | 7-3 | Season: 6/10 correct

๐Ÿ“ก CLI

rockiscope <command>

  run          Start the daemon (default)
  post         Force a post now, skip the schedule
  preview      Print what would be posted, don't touch Bluesky
  test-auth    Verify Bluesky credentials
  test-mlb     Hit the MLB API and show today's game
  test-horo    Scrape today's horoscope
  version      Print version

๐Ÿš€ Install

One command on a Raspberry Pi (or any Linux box):

curl -sSL https://raw.githubusercontent.com/tlugger/rockiscope/main/install.sh | sudo bash

This will:

  • ๐Ÿ“ฆ Download the latest release binary (or clone + build from source if no release exists)
  • ๐Ÿ“„ Create a .env file with placeholder Bluesky credentials
  • โš™๏ธ Install and enable a systemd service

After the install, edit your credentials and start the service:

sudo nano /home/pi/rockiscope/.env    # add your Bluesky app password
sudo systemctl start rockiscope

Create an app password at bsky.app/settings/app-passwords.

To update, just re-run the same install command โ€” it'll stop the service, download the latest binary, and restart.

Managing the service
sudo systemctl status rockiscope      # check status
sudo systemctl restart rockiscope     # restart
tail -f /home/pi/rockiscope/rockiscope.log  # logs

๐Ÿ“Š Data Sources

  • MLB Stats API โ€” free, no auth, real-time game data + stats
  • Horoscope.com โ€” daily Cancer horoscope
  • Bluesky AT Protocol โ€” posting via XRPC API

โœจ Sample Posts

Each post includes the game info and prediction as text, with the full horoscope rendered as an attached image card โ€” crescent moon, constellation, and all.

Game Day (1 hour before first pitch):

โšพ Rockies vs Houston Astros
๐Ÿ• 1:10 PM MDT at Coors Field
๐Ÿช– Michael Lorenzen (9.00 ERA, 0-1)
๐Ÿ“Š 5-6 | vs HOU: 2-1 | W2

๐Ÿ”ฎ A slight celestial nudge toward a Rockies defeat (55%)

๐Ÿ“Ž Attached: horoscope image card

Off Day (10 AM MST):

โšพ No Rockies game today.
๐Ÿ“Š 5-6 (.455) | Run Diff: -3 | L1

๐Ÿ“Ž Attached: horoscope image card


Built with mass amounts of misplaced loyalty and a mass amount of Coors Banquet. ๐Ÿ”๏ธ

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
mlb
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL