docrev 0.6.3 → 0.6.5

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 (2) hide show
  1. package/README.md +133 -74
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,118 +1,177 @@
1
1
  # docrev
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/docrev)](https://www.npmjs.com/package/docrev)
4
- [![Node.js](https://img.shields.io/node/v/docrev)](https://nodejs.org/)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
4
 
7
- CLI tool for academic paper workflows with Word Markdown round-trips. Handle reviewer feedback, manage comments, validate DOIs, and build to PDF/DOCX/LaTeX.
5
+ **Write papers in plain text. Generate Word when needed.**
6
+
7
+ ## Why
8
+
9
+ Word documents corrupt. Versions multiply. Track changes become unreadable. Equations break. Figures embed at wrong resolutions.
10
+
11
+ docrev solves this: write in Markdown, generate Word/PDF for collaborators. They use Word normally. You get version control, clean diffs, and automated formatting.
12
+
13
+ ```
14
+ Markdown files --> docrev --> Word/PDF
15
+ ^ |
16
+ | v
17
+ +---- docrev <---- reviewer feedback
18
+ ```
8
19
 
9
20
  ## Install
10
21
 
11
22
  ```bash
12
23
  npm install -g docrev
24
+ brew install pandoc
13
25
  ```
14
26
 
15
- **Prerequisites:** [Pandoc](https://pandoc.org/installing.html) and optionally [pandoc-crossref](https://github.com/lierdakil/pandoc-crossref)
27
+ ## Start a Project
16
28
 
29
+ From scratch:
17
30
  ```bash
18
- # macOS
19
- brew install pandoc pandoc-crossref
31
+ rev new my-paper
32
+ cd my-paper
33
+ ```
20
34
 
21
- # Verify
22
- rev --version
23
- rev install
35
+ From existing Word document:
36
+ ```bash
37
+ rev import manuscript.docx
24
38
  ```
25
39
 
26
- ## Quick Start
40
+ Project structure:
41
+ ```
42
+ my-paper/
43
+ ├── introduction.md
44
+ ├── methods.md
45
+ ├── results.md
46
+ ├── discussion.md
47
+ ├── references.bib
48
+ └── rev.yaml
49
+ ```
27
50
 
28
- ```bash
29
- # Create new project
30
- rev new my-paper
51
+ ## Markdown Basics
31
52
 
32
- # Or import from Word
33
- rev import manuscript.docx
53
+ ```markdown
54
+ # Heading
55
+
56
+ Paragraph text. **Bold** and *italic*.
34
57
 
35
- # Edit sections: introduction.md, methods.md, results.md, discussion.md
58
+ - Bullet point
59
+ - Another point
36
60
 
37
- # Build outputs
38
- rev build pdf
39
- rev build docx
40
- rev build --dual # Clean + comments DOCX with threaded comments
61
+ 1. Numbered item
62
+ 2. Second item
41
63
  ```
42
64
 
43
- ## Reviewer Workflow
65
+ ### Citations
44
66
 
45
- ```bash
46
- # Import reviewed Word doc to section files
47
- rev sections reviewed.docx
67
+ references.bib:
68
+ ```bibtex
69
+ @article{Smith2020,
70
+ author = {Smith, Jane},
71
+ title = {Paper Title},
72
+ journal = {Nature},
73
+ year = {2020}
74
+ }
75
+ ```
48
76
 
49
- # Review track changes interactively
50
- rev review methods.md
77
+ In text:
78
+ ```markdown
79
+ Previous studies [@Smith2020] demonstrated this.
80
+ ```
51
81
 
52
- # See and reply to comments
53
- rev comments methods.md
54
- rev reply methods.md -n 1 -m "Added clarification"
82
+ Output: "Previous studies (Smith 2020) demonstrated this."
55
83
 
56
- # Rebuild
57
- rev build docx --dual
84
+ ### Equations
85
+
86
+ Inline: `$E = mc^2$`
87
+
88
+ Display:
89
+ ```markdown
90
+ $$
91
+ \hat{p} = \frac{\sum_d w_d p_d}{\sum_d w_d}
92
+ $$
58
93
  ```
59
94
 
60
- ## Key Features
95
+ ### Figures
61
96
 
62
- - **Build system** - Sections → paper.md → PDF, DOCX, LaTeX
63
- - **Word import** - Extracts text, comments, equations (OMML → LaTeX), and images
64
- - **Interactive review** - Accept/reject track changes with TUI
65
- - **Comment threading** - Guy→Gilles reply pairs become threaded Word comments
66
- - **Cross-references** - `@fig:label` → "Figure 1" (auto-converted from Word)
67
- - **DOI validation** - Check and lookup DOIs via Crossref/DataCite
68
- - **Journal validation** - Check against 21 journal requirement profiles
97
+ ```markdown
98
+ ![Study site locations](figures/map.png){#fig:map}
69
99
 
70
- ## Commands
100
+ Results shown in @fig:map indicate regional variation.
101
+ ```
71
102
 
72
- | Command | Description |
73
- |---------|-------------|
74
- | `rev build [pdf\|docx\|tex]` | Build outputs from sections |
75
- | `rev build --dual` | Clean + comments DOCX |
76
- | `rev import <docx>` | Bootstrap project from Word |
77
- | `rev sections <docx>` | Import to existing section files |
78
- | `rev review <file>` | Interactive accept/reject TUI |
79
- | `rev comments <file>` | List comments with context |
80
- | `rev reply <file> -n N -m "text"` | Reply to comment |
81
- | `rev doi check [file.bib]` | Validate DOIs |
82
- | `rev doi lookup [file.bib]` | Find missing DOIs |
83
- | `rev validate -j <journal>` | Check journal requirements |
103
+ Output: "Results shown in Figure 1 indicate regional variation."
84
104
 
85
- See [docs/commands.md](docs/commands.md) for full command reference.
105
+ Figure numbers update automatically when reordered.
86
106
 
87
- ## Annotation Syntax (CriticMarkup)
107
+ ## Build
88
108
 
89
- ```markdown
90
- {++inserted text++} # Insertions
91
- {--deleted text--} # Deletions
92
- {~~old~>new~~} # Substitutions
93
- {>>Author: comment<<} # Comments
109
+ ```bash
110
+ rev build docx # Word document
111
+ rev build pdf # PDF
112
+ rev build --dual # Clean + comments versions
113
+ rev watch docx # Auto-rebuild on save
94
114
  ```
95
115
 
96
- ## Project Structure
116
+ ## Handle Reviewer Feedback
97
117
 
118
+ Import reviewed document:
119
+ ```bash
120
+ rev sections reviewed.docx
98
121
  ```
99
- my-paper/
100
- ├── rev.yaml # Config (title, authors, build settings)
101
- ├── introduction.md # Section files
102
- ├── methods.md
103
- ├── results.md
104
- ├── discussion.md
105
- ├── references.bib # Bibliography
106
- ├── figures/ # Images
107
- └── paper.docx # Generated output
122
+
123
+ View comments:
124
+ ```bash
125
+ rev comments methods.md
108
126
  ```
109
127
 
110
- ## Documentation
128
+ Reply to comment:
129
+ ```bash
130
+ rev config user "Your Name"
131
+ rev reply methods.md -n 1 -m "Clarified sampling methodology"
132
+ ```
111
133
 
112
- - [Commands Reference](docs/commands.md) - All commands with examples
113
- - [Configuration](docs/configuration.md) - rev.yaml options
114
- - [Workflow Guide](docs/workflow.md) - Step-by-step reviewer workflow
115
- - [API Reference](docs/api.md) - Library usage
134
+ Rebuild with threaded comments:
135
+ ```bash
136
+ rev build --dual
137
+ ```
138
+
139
+ Output:
140
+ - `paper.docx` (clean)
141
+ - `paper_comments.docx` (with comment threads)
142
+
143
+ ## Commands
144
+
145
+ | Task | Command |
146
+ |------|---------|
147
+ | New project | `rev new my-paper` |
148
+ | Import Word | `rev import manuscript.docx` |
149
+ | Build Word | `rev build docx` |
150
+ | Build PDF | `rev build pdf` |
151
+ | Import feedback | `rev sections reviewed.docx` |
152
+ | View comments | `rev comments methods.md` |
153
+ | Reply to comment | `rev reply methods.md -n 1 -m "text"` |
154
+ | Word count | `rev word-count` |
155
+ | Validate DOIs | `rev doi check` |
156
+ | Pre-submit check | `rev check` |
157
+
158
+ Full reference: [docs/commands.md](docs/commands.md)
159
+
160
+ ## Requirements
161
+
162
+ - Node.js 18+
163
+ - Pandoc
164
+
165
+ ```bash
166
+ # macOS
167
+ brew install pandoc
168
+
169
+ # Windows
170
+ winget install JohnMacFarlane.Pandoc
171
+
172
+ # Linux
173
+ sudo apt install pandoc
174
+ ```
116
175
 
117
176
  ## License
118
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docrev",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Academic paper revision workflow: Word ↔ Markdown round-trips, DOI validation, reviewer comments",
5
5
  "type": "module",
6
6
  "types": "types/index.d.ts",