bluesky-text-to-audio

A Chrome extension that displays a play button on Bluesky timeline posts.

Features

Installation Guide for Users

  1. Clone or download this repository
    git clone https://github.com/cat2151/bluesky-text-to-audio.git
    
  2. Open chrome://extensions/ in Chrome
  3. Enable ‘Developer mode’
  4. Click ‘Load unpacked’ and select the dist folder

Note: The pre-built dist/ folder is included in the repository, so installing Bun or build tools is not required.

Usage

  1. Open Bluesky
  2. Click the ‘▶ Open textarea’ button that appears on each timeline post to open the textarea
  3. Enter an MML string into the textarea
  4. Click the ‘🎵 Play with mmlabc’ button to parse the MML, display the sheet music, and play it
  5. Click the ‘▶ Play’ button to directly play the textarea content as ABC notation

Automatic Mode Detection per Post

If a post’s first or last line contains specific keywords, the initial button mode will be automatically determined.

Keyword (Priority) Automatically Selected Mode
Chord or コード 🎸 Play with chord2mml
YM2151 or OPM 🎶 Play with YM2151
Tonejs or Tone.js 🎹 Play with Tone.js
MML 🎵 Play with mmlabc
abc ▶ Play with abcjs
(Otherwise) 🔊 Read post aloud (Zundamon)

The line used for detection (first or last) is automatically removed when setting the content in the textarea.

Priority Details: The first line is scanned first according to the order in the table above. If no match is found, the last line is scanned in the same order.

For Developers

Tech Stack

Setup Instructions

1. Install Bun

curl -fsSL https://bun.sh/install | bash

2. Clone the Repository

git clone https://github.com/cat2151/bluesky-text-to-audio.git
cd bluesky-text-to-audio

3. Install Dependencies

bun install

4. Build

bun run build

Build artifacts are output to the dist/ directory.

5. Load into Chrome

  1. Open chrome://extensions/ in Chrome
  2. Enable ‘Developer mode’
  3. Click ‘Load unpacked’ and select the dist folder

Development Commands

Command Description
bun run dev Development mode (watch + HMR)
bun run build Production build
bun run type-check TypeScript type check

Directory Structure

bluesky-text-to-audio/
├── src/
│   └── content.ts      # Content script (TypeScript)
├── manifest.json        # Chrome Extension Manifest (Manifest V3)
├── vite.config.ts       # Vite configuration
├── tsconfig.json        # TypeScript configuration
├── package.json         # Package configuration / scripts
└── dist/                # Build artifacts (CI auto-commits)

Purpose: Why This Feature Exists?

PoC

Goals

Future Work

Out of Scope