A lightweight macOS CLI tool for analyzing, extracting, and repackaging clipboard content—specifically designed to handle HTML and Apple's WebArchive format (used by Outlook, Safari, and Mail).
pbhtml solves the common problem of editing email signatures or complex web snippets that contain embedded images.
- Analyze: See exactly what data types (HTML, WebArchive, Plain Text) and sizes are currently in your clipboard.
- Extract (Paste): Decodes a WebArchive into a clean HTML file and separate asset files (PNG, JPG, etc.). It automatically replaces internal
cid:orfile://references with local file paths. - Repackage (Copy): Takes your edited HTML and associated assets (e.g.,
sig-1.png) and bundles them back into a valid binary WebArchive on your clipboard, ready to be pasted back into Outlook or Mail with all images intact.