Skip to content

Rich clipboard content (HTML, images) #7

@djdarcy

Description

@djdarcy

Summary

Support rich clipboard content (HTML, images) in both the tee pipeline and clipboard history.

Motivation

Modern clipboard usage involves more than plain text — HTML from web pages, images from screenshots, formatted text from editors. teeclip's history feature should preserve these.

Proposed Behavior

# Copy rich content from clipboard to history
teeclip --save              # Saves whatever's on clipboard (text, HTML, image)

# List shows content type
teeclip --list
#   1  2026-02-16 21:00  [text]  "hello world"
#   2  2026-02-16 20:55  [html]  "<b>bold</b> text"
#   3  2026-02-16 20:50  [image] screenshot.png (42KB)

# Retrieve respects original type
teeclip --get 3             # Puts image back on clipboard

Implementation Notes

  • Optional dependency: jaraco.clipboard (supports HTML on macOS, HTML+images on Windows)
  • History storage: text as .clip, HTML as .html, images as .png
  • JSONL metadata includes type field: text/plain, text/html, image/png
  • Pipe mode (stdin | teeclip) remains text-only — rich content only via --save and history
  • Graceful degradation: if rich library not installed, only text is captured

Dependencies

  • jaraco.clipboard as optional: pip install teeclip[rich]

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature requestphase 3Phase 3: Rich Content & Native Clipboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions