omp packages

pi-rich-paste0.2.3

Pi skill that copies Markdown to the clipboard as app-native rich text for Slack and Signal

GitHub Actions Published 4 days ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-rich-paste

A Pi package that copies Markdown to the clipboard as rich text for Slack and Signal. The skill writes each app's native clipboard representation, so formatting survives the paste instead of arriving as asterisks.

Install

pi install npm:pi-rich-paste

Or try it without changing settings:

pi -e npm:pi-rich-paste

Git installs work too: pi install git:github.com/drichardson/pi-rich-paste.

Requirements

  • Python 3.10+
  • On Linux, native Wayland data-control when available; otherwise every available wl-copy and/or xclip backend
  • macOS uses osascript; Windows uses PowerShell

Usage

./scripts/paste.py slack message.md
./scripts/paste.py signal message.md
cat message.md | ./scripts/paste.py signal

Common formatting: **bold**, *italics*, `monospace`, ~~strikethrough~~.

Slack additionally supports headings, lists, quotes, links, tables, fenced code blocks, and Unicode emoji.

Signal additionally supports ||spoiler||. Markdown links become label (url) because Signal has no rich hyperlink style; headings, lists, tables, quotes, and fenced code blocks stay literal.

Adding an app

Add a module in skills/rich-paste/scripts/ exposing paste(markdown), then register it in TARGETS in paste.py.

Tests

uv is a development tool only; consumers run the skill with python3.

uv sync
uv run pytest skills/rich-paste/tests
uv run coverage run --branch -m pytest skills/rich-paste/tests
uv run coverage report --fail-under=95

Coverage must stay at or above 95%. Each converter also has a --self-test flag that does not touch the clipboard.

Releasing

Publishing runs from a GitHub release. Bump version in package.json, commit, then publish a release whose tag is v<version>:

gh release create v0.2.0 --generate-notes

The publish workflow tests the tagged commit, checks the tag against package.json, and publishes straight to npm through trusted publishing — the job's OIDC identity replaces any token, and provenance is generated automatically. Prerelease versions go to the next dist-tag instead of latest.

The trusted publisher on npm is scoped to this repository and publish.yml, which is what keeps any other workflow — or a leaked token — from shipping a version.