docrev 0.6.4 → 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 +68 -182
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,132 +2,90 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/docrev)](https://www.npmjs.com/package/docrev)
4
4
 
5
- **Write your papers in plain text. Generate Word documents when you need them.**
5
+ **Write papers in plain text. Generate Word when needed.**
6
6
 
7
- ## The Problem
7
+ ## Why
8
8
 
9
- You're writing a scientific paper. Your supervisor reviews it in Word, adding comments and track changes. You address the feedback, send it back. Another round of reviews. Then journal submission. Then reviewer comments. More Word documents flying back and forth.
9
+ Word documents corrupt. Versions multiply. Track changes become unreadable. Equations break. Figures embed at wrong resolutions.
10
10
 
11
- Sound familiar?
12
-
13
- - Word files get corrupted
14
- - "Which version is the latest?" confusion
15
- - Track changes become unreadable after multiple rounds
16
- - Equations break when copy-pasting
17
- - Figures get embedded at wrong resolutions
18
- - Collaborating means emailing files back and forth
19
-
20
- ## The Solution
21
-
22
- **docrev** lets you write in plain text (Markdown) and generate Word/PDF whenever you need to share. Your collaborators keep using Word — they don't need to change anything. You get:
23
-
24
- - **Version control** — See exactly what changed, when, and why
25
- - **No corruption** — Plain text files never break
26
- - **Equations that work** — Write LaTeX, get perfect equations in Word
27
- - **Figures stay separate** — Reference images, don't embed them
28
- - **Automated formatting** — Citations, cross-references, all handled
29
-
30
- ## How It Works
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.
31
12
 
32
13
  ```
33
- Your text files ───► docrev ───► Word/PDF for collaborators
34
- │ │
35
- │ ▼
36
- │ They add comments
37
- │ │
38
- │ ▼
39
- └────────────── docrev ◄──── They send it back
40
- (imports their feedback)
14
+ Markdown files --> docrev --> Word/PDF
15
+ ^ |
16
+ | v
17
+ +---- docrev <---- reviewer feedback
41
18
  ```
42
19
 
43
- You always work in plain text. Word is just the delivery format.
44
-
45
- ---
46
-
47
- ## Quick Start
48
-
49
- ### Install
20
+ ## Install
50
21
 
51
22
  ```bash
52
23
  npm install -g docrev
53
- brew install pandoc # Required for Word/PDF generation
24
+ brew install pandoc
54
25
  ```
55
26
 
56
- ### Start a New Paper
27
+ ## Start a Project
57
28
 
29
+ From scratch:
58
30
  ```bash
59
31
  rev new my-paper
60
32
  cd my-paper
61
33
  ```
62
34
 
63
- This creates:
64
- ```
65
- my-paper/
66
- ├── introduction.md ← Write your intro here
67
- ├── methods.md ← Your methods
68
- ├── results.md ← Your results
69
- ├── discussion.md ← Your discussion
70
- ├── references.bib ← Your citations
71
- └── rev.yaml ← Paper title, authors
72
- ```
73
-
74
- ### Or Import from Existing Word Document
75
-
35
+ From existing Word document:
76
36
  ```bash
77
- rev import my-manuscript.docx
37
+ rev import manuscript.docx
78
38
  ```
79
39
 
80
- docrev extracts:
81
- - Text → Markdown files
82
- - Comments → Preserved with author names
83
- - Equations → Converted to LaTeX
84
- - Images → Saved to figures/
85
-
86
- ---
87
-
88
- ## Writing in Markdown
89
-
90
- Markdown is just text with simple formatting. If you can write an email, you can write Markdown.
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
+ ```
91
50
 
92
- ### Basic Formatting
51
+ ## Markdown Basics
93
52
 
94
53
  ```markdown
95
- # This is a Heading
54
+ # Heading
96
55
 
97
- This is a paragraph. **Bold text** and *italic text*.
56
+ Paragraph text. **Bold** and *italic*.
98
57
 
99
58
  - Bullet point
100
- - Another bullet
59
+ - Another point
101
60
 
102
- 1. Numbered list
61
+ 1. Numbered item
103
62
  2. Second item
104
63
  ```
105
64
 
106
65
  ### Citations
107
66
 
108
- In your `.bib` file:
67
+ references.bib:
109
68
  ```bibtex
110
69
  @article{Smith2020,
111
70
  author = {Smith, Jane},
112
- title = {My Paper Title},
71
+ title = {Paper Title},
113
72
  journal = {Nature},
114
73
  year = {2020}
115
74
  }
116
75
  ```
117
76
 
118
- In your text:
77
+ In text:
119
78
  ```markdown
120
- Previous studies have shown this effect [@Smith2020].
121
- Multiple citations work too [@Smith2020; @Jones2021].
79
+ Previous studies [@Smith2020] demonstrated this.
122
80
  ```
123
81
 
124
- → Becomes: "Previous studies have shown this effect (Smith 2020)."
82
+ Output: "Previous studies (Smith 2020) demonstrated this."
125
83
 
126
84
  ### Equations
127
85
 
128
- Inline: `$E = mc^2$` → E = mc²
86
+ Inline: `$E = mc^2$`
129
87
 
130
- Display equation:
88
+ Display:
131
89
  ```markdown
132
90
  $$
133
91
  \hat{p} = \frac{\sum_d w_d p_d}{\sum_d w_d}
@@ -137,123 +95,72 @@ $$
137
95
  ### Figures
138
96
 
139
97
  ```markdown
140
- ![Map of study sites across Europe](figures/map.png){#fig:map}
98
+ ![Study site locations](figures/map.png){#fig:map}
141
99
 
142
- As shown in @fig:map, our study sites span 12 countries.
100
+ Results shown in @fig:map indicate regional variation.
143
101
  ```
144
102
 
145
- → In Word: "As shown in Figure 1, our study sites..."
146
-
147
- The figure number updates automatically if you reorder figures.
148
-
149
- ---
103
+ Output: "Results shown in Figure 1 indicate regional variation."
150
104
 
151
- ## Build Your Document
152
-
153
- ```bash
154
- rev build docx # Generate Word document
155
- rev build pdf # Generate PDF
156
- rev build --dual # Both clean + with-comments versions
157
- ```
105
+ Figure numbers update automatically when reordered.
158
106
 
159
- ### Preview While Writing
107
+ ## Build
160
108
 
161
109
  ```bash
162
- rev watch docx # Auto-rebuilds when you save
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
163
114
  ```
164
115
 
165
- ---
166
-
167
116
  ## Handle Reviewer Feedback
168
117
 
169
- ### 1. Receive Reviewed Document
170
-
171
- Your supervisor sends back `manuscript_reviewed.docx` with comments and track changes.
172
-
118
+ Import reviewed document:
173
119
  ```bash
174
- rev sections manuscript_reviewed.docx
120
+ rev sections reviewed.docx
175
121
  ```
176
122
 
177
- This imports their changes into your Markdown files.
178
-
179
- ### 2. See Their Comments
180
-
123
+ View comments:
181
124
  ```bash
182
125
  rev comments methods.md
183
126
  ```
184
127
 
185
- Output:
186
- ```
187
- #1 [Dr. Smith] line 45
188
- "Please clarify the sampling methodology"
189
-
190
- #2 [Dr. Smith] line 78
191
- "Add a citation here"
192
- ```
193
-
194
- ### 3. Reply to Comments
195
-
128
+ Reply to comment:
196
129
  ```bash
197
- rev config user "Your Name" # Set your name (once)
198
- rev reply methods.md -n 1 -m "Added detail about random sampling in paragraph 2"
130
+ rev config user "Your Name"
131
+ rev reply methods.md -n 1 -m "Clarified sampling methodology"
199
132
  ```
200
133
 
201
- ### 4. Rebuild and Send Back
202
-
134
+ Rebuild with threaded comments:
203
135
  ```bash
204
136
  rev build --dual
205
137
  ```
206
138
 
207
- Creates:
208
- - `paper.docx` — Clean version
209
- - `paper_comments.docx` With threaded comment conversations
210
-
211
- Your reply appears under their comment, just like a conversation in Word.
212
-
213
- ---
214
-
215
- ## Why Separate Files?
139
+ Output:
140
+ - `paper.docx` (clean)
141
+ - `paper_comments.docx` (with comment threads)
216
142
 
217
- Instead of one giant document, docrev uses separate files for each section:
143
+ ## Commands
218
144
 
219
- | File | Content |
145
+ | Task | Command |
220
146
  |------|---------|
221
- | `introduction.md` | Background, aims, hypotheses |
222
- | `methods.md` | Study design, analysis |
223
- | `results.md` | Findings |
224
- | `discussion.md` | Interpretation |
225
-
226
- **Benefits:**
227
- - Easier to navigate
228
- - Work on one section without scrolling
229
- - Git shows changes per section
230
- - Collaborators can review specific parts
231
-
232
- ---
233
-
234
- ## Commands Reference
235
-
236
- | What you want to do | Command |
237
- |---------------------|---------|
238
- | Create new paper | `rev new my-paper` |
239
- | Import from Word | `rev import manuscript.docx` |
240
- | Build Word doc | `rev build docx` |
147
+ | New project | `rev new my-paper` |
148
+ | Import Word | `rev import manuscript.docx` |
149
+ | Build Word | `rev build docx` |
241
150
  | Build PDF | `rev build pdf` |
242
- | Import reviewer feedback | `rev sections reviewed.docx` |
243
- | See all comments | `rev comments methods.md` |
244
- | Reply to comment #1 | `rev reply methods.md -n 1 -m "Fixed"` |
245
- | Check word count | `rev word-count` |
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` |
246
155
  | Validate DOIs | `rev doi check` |
247
- | Check before submission | `rev check` |
156
+ | Pre-submit check | `rev check` |
248
157
 
249
- See [full documentation](docs/commands.md) for all commands.
250
-
251
- ---
158
+ Full reference: [docs/commands.md](docs/commands.md)
252
159
 
253
160
  ## Requirements
254
161
 
255
- - **Node.js 18+** — [Download](https://nodejs.org/)
256
- - **Pandoc** — Converts Markdown to Word/PDF
162
+ - Node.js 18+
163
+ - Pandoc
257
164
 
258
165
  ```bash
259
166
  # macOS
@@ -266,27 +173,6 @@ winget install JohnMacFarlane.Pandoc
266
173
  sudo apt install pandoc
267
174
  ```
268
175
 
269
- ---
270
-
271
- ## FAQ
272
-
273
- **Q: Do my collaborators need to install docrev?**
274
- No. They keep using Word normally. You handle the conversion.
275
-
276
- **Q: Can I use my existing Word document?**
277
- Yes. `rev import manuscript.docx` converts it to Markdown.
278
-
279
- **Q: What about my bibliography?**
280
- Use a `.bib` file (export from Zotero/Mendeley/EndNote). Citations are handled automatically.
281
-
282
- **Q: Will equations look right in Word?**
283
- Yes. LaTeX equations are converted to native Word equations.
284
-
285
- **Q: What if I make a mistake?**
286
- Plain text + Git means you can always go back. Run `rev backup` before big changes.
287
-
288
- ---
289
-
290
176
  ## License
291
177
 
292
178
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docrev",
3
- "version": "0.6.4",
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",