clipfix 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +96 -0
  2. package/bin/clipfix +0 -0
  3. package/package.json +2 -1
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # clipfix
2
+
3
+ > Fix copy-pasted text from LLMs and the web -- instantly convert fancy Unicode punctuation to plain ASCII.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g clipfix
9
+ ```
10
+
11
+ **macOS only** (ARM64 and Intel)
12
+
13
+ ## Two Modes
14
+
15
+ **Soft mode (default)** -- removes invisible/structural characters and AI-signature typographic characters (curly quotes `""''`, em/en dashes `---`, ellipsis `...`). Arrows, math symbols, and guillemets are left untouched.
16
+
17
+ **Hard mode (`--hard`)** -- also replaces all remaining typographic Unicode with ASCII equivalents. Useful for terminal output, source code, or strictly ASCII pipelines.
18
+
19
+ ## Usage
20
+
21
+ ### Clipboard Mode
22
+ Copy text from anywhere, then:
23
+ ```bash
24
+ clipfix --clipboard # soft mode (default)
25
+ clipfix --hard --clipboard # hard mode
26
+ # Fixed N characters
27
+ ```
28
+
29
+ ### Pipe Mode
30
+ ```bash
31
+ # Soft sanitize a file
32
+ cat email.md | clipfix > email-clean.md
33
+
34
+ # Hard sanitize — flatten all Unicode punctuation to ASCII
35
+ echo '"Hello — world"' | clipfix --hard
36
+ # Output: "Hello -- world"
37
+
38
+ # Fix a file
39
+ cat document.md | clipfix --hard > fixed.md
40
+ ```
41
+
42
+ ### List All Replaced Characters
43
+ ```bash
44
+ clipfix --list-replacements
45
+ ```
46
+ Prints a full table of every character clipfix handles, grouped by soft/hard mode.
47
+
48
+ ## Command Reference
49
+
50
+ ```
51
+ clipfix [OPTIONS]
52
+
53
+ Options:
54
+ -S, --soft Soft sanitize: remove only invisible/structural characters (default)
55
+ -H, --hard Hard sanitize: also replace typographic characters with ASCII equivalents
56
+ -c, --clipboard Read from and write to clipboard
57
+ -l, --list-replacements List all characters replaced by clipfix, grouped by mode
58
+ -h, --help Print help
59
+ -V, --version Print version
60
+ ```
61
+
62
+ ## What Gets Fixed
63
+
64
+ ### Soft mode (default)
65
+
66
+ | Unicode | Becomes | Description |
67
+ |---------|---------|-------------|
68
+ | U+00A0 | ` ` (space) | Non-breaking space |
69
+ | U+200B | *(removed)* | Zero-width space |
70
+ | U+FEFF | *(removed)* | BOM marker |
71
+ | U+200E/F | *(removed)* | Directional marks |
72
+ | U+2018/19 | `'` | Curly single quotes |
73
+ | U+201C/D | `"` | Curly double quotes |
74
+ | U+2014 | `--` | Em dash |
75
+ | U+2013 | `-` | En dash |
76
+ | U+2026 | `...` | Ellipsis |
77
+
78
+ ### Hard mode only
79
+
80
+ | Unicode | ASCII | Example |
81
+ |---------|-------|---------|
82
+ | `—` (em dash) | `--` | `Hello—world` → `Hello--world` |
83
+ | `""` (smart quotes) | `""` | `"hello"` → `"hello"` |
84
+ | `→` (arrow) | `->` | `step → next` → `step -> next` |
85
+ | `≠` | `!=` | `x ≠ y` → `x != y` |
86
+ | `…` | `...` | `wait…` → `wait...` |
87
+
88
+ Plus 15+ more — run `clipfix --list-replacements` for the full list.
89
+
90
+ ## Why?
91
+
92
+ LLMs love fancy punctuation that breaks in terminals, code editors, and config files.
93
+
94
+ ## License
95
+
96
+ MIT
package/bin/clipfix CHANGED
Binary file
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "clipfix",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Fix copy-pasted text from LLMs - convert fancy Unicode punctuation to plain ASCII",
5
5
  "main": "clipfix.js",
6
6
  "bin": {
7
7
  "clipfix": "./clipfix.js"
8
8
  },
9
9
  "files": [
10
+ "README.md",
10
11
  "clipfix.js",
11
12
  "bin/clipfix"
12
13
  ],