Metadata-Version: 2.4
Name: clipfix
Version: 0.1.0
Summary: Remove visual hard-wraps from terminal-copied text
Project-URL: Homepage, https://github.com/panshul/clipfix
Project-URL: Repository, https://github.com/panshul/clipfix
Project-URL: Issues, https://github.com/panshul/clipfix/issues
License: MIT
License-File: LICENSE
Keywords: clipboard,terminal,text,utility
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# clipfix

Fixes text copied from a terminal by removing visual hard-wraps.

When you copy a paragraph from a terminal (e.g. Claude Code inside VS Code), the terminal's line-wrapping gets baked into the clipboard — every line ends with a newline and continuation lines have leading spaces. `clipfix` strips those out and rejoins the text into clean paragraphs, while preserving real paragraph breaks and bulleted/numbered lists.

## Install

```bash
pip install clipfix
```

> macOS only — uses `pbpaste` / `pbcopy`.

## Usage

1. Copy broken text from the terminal.
2. Run `clipfix`.
3. Paste — the clipboard now contains clean text.

```bash
clipfix          # fix clipboard in-place
clipfix --test   # run self-tests
```

## What it does

- **Merges wrapped lines** within a paragraph into a single line
- **Preserves paragraph breaks** (blank lines between blocks)
- **Preserves list structure** — bulleted (`-`, `*`, `•`) and numbered (`1.`, `2)`) lists keep each item on its own line, with any wrapped continuations merged in

## Example

**Before** (copied from terminal):

```
When you copy a long paragraph from a terminal, line breaks and leading
   spaces from the terminal's word-wrap get included in the clipboard.
   clipfix merges those back into clean paragraphs.

- First bullet point that wraps onto
  the next line
- Second bullet point
```

**After** running `clipfix`:

```
When you copy a long paragraph from a terminal, line breaks and leading spaces from the terminal's word-wrap get included in the clipboard. clipfix merges those back into clean paragraphs.

- First bullet point that wraps onto the next line
- Second bullet point
```

## License

MIT
