clipfix 0.1.2 → 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 +54 -7
  2. package/bin/clipfix +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # clipfix
2
2
 
3
- > Fix copy-pasted text from LLMs and the web instantly convert fancy Unicode punctuation to plain ASCII.
3
+ > Fix copy-pasted text from LLMs and the web -- instantly convert fancy Unicode punctuation to plain ASCII.
4
4
 
5
5
  ## Installation
6
6
 
@@ -10,26 +10,73 @@ npm install -g clipfix
10
10
 
11
11
  **macOS only** (ARM64 and Intel)
12
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
+
13
19
  ## Usage
14
20
 
15
21
  ### Clipboard Mode
16
22
  Copy text from anywhere, then:
17
23
  ```bash
18
- clipfix --clipboard
19
- # Fixed 8 characters
24
+ clipfix --clipboard # soft mode (default)
25
+ clipfix --hard --clipboard # hard mode
26
+ # Fixed N characters
20
27
  ```
21
28
 
22
29
  ### Pipe Mode
23
30
  ```bash
24
- echo '"Hello world"' | clipfix
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
25
36
  # Output: "Hello -- world"
26
37
 
27
38
  # Fix a file
28
- cat document.md | clipfix > fixed.md
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
29
60
  ```
30
61
 
31
62
  ## What Gets Fixed
32
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
+
33
80
  | Unicode | ASCII | Example |
34
81
  |---------|-------|---------|
35
82
  | `—` (em dash) | `--` | `Hello—world` → `Hello--world` |
@@ -38,11 +85,11 @@ cat document.md | clipfix > fixed.md
38
85
  | `≠` | `!=` | `x ≠ y` → `x != y` |
39
86
  | `…` | `...` | `wait…` → `wait...` |
40
87
 
41
- Plus 20+ more transformations including zero-width space removal.
88
+ Plus 15+ more run `clipfix --list-replacements` for the full list.
42
89
 
43
90
  ## Why?
44
91
 
45
- LLMs love fancy punctuation that breaks in terminals, code editors, and config files. clipfix sanitizes it instantly.
92
+ LLMs love fancy punctuation that breaks in terminals, code editors, and config files.
46
93
 
47
94
  ## License
48
95
 
package/bin/clipfix CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clipfix",
3
- "version": "0.1.2",
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": {