reviw 0.6.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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/cli.cjs +3399 -0
  4. package/package.json +35 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 kazuph
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # reviw
2
+
3
+ A lightweight browser-based tool for reviewing and annotating tabular data, text, and Markdown files. Supports CSV, TSV, plain text, and Markdown. Comments are output as YAML to stdout.
4
+
5
+ ## Features
6
+
7
+ - **CSV/TSV support**: View tabular data with column/row freezing and filtering
8
+ - **Markdown support**: Side-by-side preview with synchronized scrolling
9
+ - **Text support**: Line-by-line commenting for plain text files
10
+ - **Multi-file support**: Open multiple files simultaneously on separate ports
11
+ - **Drag selection**: Select rectangular regions or multiple rows for batch comments
12
+ - **Real-time**: Hot reload on file changes via SSE
13
+ - **YAML output**: Comments exported with file, mode, row, col, value, and text
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install -g reviw
19
+ ```
20
+
21
+ Or run directly with npx:
22
+
23
+ ```bash
24
+ npx reviw <file>
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ # Single file
31
+ reviw <file> [--port 3000] [--encoding utf8|shift_jis|...]
32
+
33
+ # Multiple files (each opens on consecutive ports)
34
+ reviw file1.csv file2.md file3.tsv --port 3000
35
+ ```
36
+
37
+ - Browser opens automatically (macOS: `open` / Linux: `xdg-open` / Windows: `start`)
38
+ - Click cells to add comments, or drag to select multiple cells/rows
39
+ - Close the tab or click "Submit & Exit" to output comments as YAML and terminate the server
40
+ - Encoding defaults to UTF-8; use `--encoding` to specify or let `chardet` auto-detect (Shift_JIS, CP932, etc.)
41
+ - Use `--no-open` to prevent automatic browser opening
42
+
43
+ ## Screenshots
44
+
45
+ ### CSV View
46
+
47
+ ![CSV View](./assets/screenshot-csv.png)
48
+
49
+ ### Markdown View
50
+
51
+ ![Markdown View](./assets/screenshot-md.png)
52
+
53
+ ## Output Example
54
+
55
+ ```yaml
56
+ file: data.csv
57
+ mode: csv
58
+ reason: button
59
+ at: '2025-11-26T12:00:00.000Z'
60
+ comments:
61
+ - row: 2
62
+ col: 3
63
+ text: This value needs review
64
+ value: '150'
65
+ ```
66
+
67
+ ## Development
68
+
69
+ - Main source: `cli.cjs`
70
+ - Tests: `npm test` (vitest + playwright)
71
+
72
+ ## License
73
+
74
+ MIT