docrev 0.9.15 → 0.9.16

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 (41) hide show
  1. package/README.md +41 -46
  2. package/dist/lib/wordcomments.d.ts.map +1 -1
  3. package/dist/lib/wordcomments.js +25 -2
  4. package/dist/lib/wordcomments.js.map +1 -1
  5. package/docs-src/build.py +113 -0
  6. package/docs-src/extra.css +208 -0
  7. package/docs-src/md-to-html.lua +6 -0
  8. package/docs-src/template.html +116 -0
  9. package/lib/wordcomments.ts +25 -2
  10. package/mkdocs.yml +64 -0
  11. package/package.json +1 -1
  12. package/site/assets/extra.css +208 -0
  13. package/site/commands.html +926 -0
  14. package/site/configuration.html +469 -0
  15. package/site/index.html +288 -0
  16. package/site/troubleshooting.html +461 -0
  17. package/site/workflow.html +518 -0
  18. package/dev_notes/bug_repro_comment_parser.md +0 -71
  19. package/dev_notes/stress2/adversarial.docx +0 -0
  20. package/dev_notes/stress2/build_adversarial.ts +0 -186
  21. package/dev_notes/stress2/drift_matcher.ts +0 -62
  22. package/dev_notes/stress2/probe_anchors.ts +0 -35
  23. package/dev_notes/stress2/project/adversarial.docx +0 -0
  24. package/dev_notes/stress2/project/discussion.before.md +0 -3
  25. package/dev_notes/stress2/project/discussion.md +0 -3
  26. package/dev_notes/stress2/project/methods.before.md +0 -20
  27. package/dev_notes/stress2/project/methods.md +0 -20
  28. package/dev_notes/stress2/project/rev.yaml +0 -5
  29. package/dev_notes/stress2/project/sections.yaml +0 -4
  30. package/dev_notes/stress2/sections.yaml +0 -5
  31. package/dev_notes/stress2/trace_placement.ts +0 -50
  32. package/dev_notes/stresstest_boundaries.ts +0 -27
  33. package/dev_notes/stresstest_drift_apply.ts +0 -43
  34. package/dev_notes/stresstest_drift_compare.ts +0 -43
  35. package/dev_notes/stresstest_drift_v2.ts +0 -54
  36. package/dev_notes/stresstest_inspect.ts +0 -54
  37. package/dev_notes/stresstest_pstyle.ts +0 -55
  38. package/dev_notes/stresstest_section_debug.ts +0 -23
  39. package/dev_notes/stresstest_split.ts +0 -70
  40. package/dev_notes/stresstest_trace.ts +0 -19
  41. package/dev_notes/stresstest_verify_no_overwrite.ts +0 -40
@@ -0,0 +1,288 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-bs-theme="light">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Home — docrev</title>
7
+ <meta name="description" content="CLI for writing documents in Markdown while collaborating with Word users.">
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@5.3.3/dist/sandstone/bootstrap.min.css">
9
+ <style>
10
+ html { -webkit-text-size-adjust: 100%; }
11
+ pre > code.sourceCode { white-space: pre; position: relative; }
12
+ pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
13
+ pre > code.sourceCode > span:empty { height: 1.2em; }
14
+ .sourceCode { overflow: visible; }
15
+ code.sourceCode > span { color: inherit; text-decoration: inherit; }
16
+ div.sourceCode { margin: 1em 0; }
17
+ pre.sourceCode { margin: 0; }
18
+ @media screen {
19
+ div.sourceCode { overflow: auto; }
20
+ }
21
+ @media print {
22
+ pre > code.sourceCode { white-space: pre-wrap; }
23
+ pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
24
+ }
25
+ pre.numberSource code
26
+ { counter-reset: source-line 0; }
27
+ pre.numberSource code > span
28
+ { position: relative; left: -4em; counter-increment: source-line; }
29
+ pre.numberSource code > span > a:first-child::before
30
+ { content: counter(source-line);
31
+ position: relative; left: -1em; text-align: right; vertical-align: baseline;
32
+ border: none; display: inline-block;
33
+ -webkit-touch-callout: none; -webkit-user-select: none;
34
+ -khtml-user-select: none; -moz-user-select: none;
35
+ -ms-user-select: none; user-select: none;
36
+ padding: 0 4px; width: 4em;
37
+ color: #aaaaaa;
38
+ }
39
+ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
40
+ div.sourceCode
41
+ { }
42
+ @media screen {
43
+ pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
44
+ }
45
+ code span.al { color: #ff0000; font-weight: bold; } /* Alert */
46
+ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
47
+ code span.at { color: #7d9029; } /* Attribute */
48
+ code span.bn { color: #40a070; } /* BaseN */
49
+ code span.bu { color: #008000; } /* BuiltIn */
50
+ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
51
+ code span.ch { color: #4070a0; } /* Char */
52
+ code span.cn { color: #880000; } /* Constant */
53
+ code span.co { color: #60a0b0; font-style: italic; } /* Comment */
54
+ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
55
+ code span.do { color: #ba2121; font-style: italic; } /* Documentation */
56
+ code span.dt { color: #902000; } /* DataType */
57
+ code span.dv { color: #40a070; } /* DecVal */
58
+ code span.er { color: #ff0000; font-weight: bold; } /* Error */
59
+ code span.ex { } /* Extension */
60
+ code span.fl { color: #40a070; } /* Float */
61
+ code span.fu { color: #06287e; } /* Function */
62
+ code span.im { color: #008000; font-weight: bold; } /* Import */
63
+ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
64
+ code span.kw { color: #007020; font-weight: bold; } /* Keyword */
65
+ code span.op { color: #666666; } /* Operator */
66
+ code span.ot { color: #007020; } /* Other */
67
+ code span.pp { color: #bc7a00; } /* Preprocessor */
68
+ code span.sc { color: #4070a0; } /* SpecialChar */
69
+ code span.ss { color: #bb6688; } /* SpecialString */
70
+ code span.st { color: #4070a0; } /* String */
71
+ code span.va { color: #19177c; } /* Variable */
72
+ code span.vs { color: #4070a0; } /* VerbatimString */
73
+ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
74
+ </style>
75
+ <link rel="stylesheet" href="assets/extra.css">
76
+ </head>
77
+ <body>
78
+
79
+ <nav class="navbar navbar-expand-lg fixed-top" aria-label="Site navigation">
80
+ <div class="container">
81
+ <a class="navbar-brand me-2" href="index.html">docrev</a>
82
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-main" aria-controls="navbar-main" aria-expanded="false" aria-label="Toggle navigation">
83
+ <span class="navbar-toggler-icon"></span>
84
+ </button>
85
+ <div class="collapse navbar-collapse" id="navbar-main">
86
+ <ul class="navbar-nav me-auto">
87
+ <li class="nav-item">
88
+ <a class="nav-link active" aria-current="page" href="index.html">Home</a>
89
+ </li>
90
+ <li class="nav-item">
91
+ <a class="nav-link" href="workflow.html">Get Started</a>
92
+ </li>
93
+ <li class="nav-item">
94
+ <a class="nav-link" href="commands.html">Commands</a>
95
+ </li>
96
+ <li class="nav-item">
97
+ <a class="nav-link" href="configuration.html">Configuration</a>
98
+ </li>
99
+ <li class="nav-item">
100
+ <a class="nav-link" href="troubleshooting.html">Troubleshooting</a>
101
+ </li>
102
+ </ul>
103
+ <ul class="navbar-nav">
104
+ <li class="nav-item">
105
+ <button id="theme-toggle" class="btn btn-link nav-link border-0" aria-label="Toggle dark mode">
106
+ <svg id="icon-sun" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
107
+ <path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6m0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8M8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0m0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13m8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5M3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8m10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0m-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0m9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707M4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707"/>
108
+ </svg>
109
+ <svg id="icon-moon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" style="display:none">
110
+ <path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278"/>
111
+ </svg>
112
+ </button>
113
+ </li>
114
+ <li class="nav-item">
115
+ <a class="nav-link" href="https://github.com/gcol33/docrev" aria-label="GitHub">
116
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="currentColor" viewBox="0 0 16 16">
117
+ <path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8"/>
118
+ </svg>
119
+ </a>
120
+ </li>
121
+ <li class="nav-item">
122
+ <a class="nav-link" href="https://www.npmjs.com/package/docrev" aria-label="npm">
123
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
124
+ <path d="M0 0v16h16V0zm5.333 13.333H2.667V5.333h2.666v5.334H8V5.333h2.667v8H5.333z"/>
125
+ </svg>
126
+ </a>
127
+ </li>
128
+ </ul>
129
+ </div>
130
+ </div>
131
+ </nav>
132
+
133
+ <div class="container template-home">
134
+ <div class="row">
135
+ <main id="main" class="col-12">
136
+ <h1 id="docrev">docrev</h1>
137
+ <div class="badge-row">
138
+ <p><a href="https://www.npmjs.com/package/docrev"><img
139
+ src="https://img.shields.io/npm/v/docrev" alt="npm" /></a> <a
140
+ href="https://www.npmjs.com/package/docrev"><img
141
+ src="https://img.shields.io/npm/dm/docrev"
142
+ alt="npm downloads" /></a> <a href="https://nodejs.org"><img
143
+ src="https://img.shields.io/node/v/docrev" alt="node" /></a> <a
144
+ href="https://opensource.org/licenses/MIT"><img
145
+ src="https://img.shields.io/badge/License-MIT-blue.svg"
146
+ alt="License: MIT" /></a> <a
147
+ href="https://github.com/gcol33/docrev/actions/workflows/ci.yml"><img
148
+ src="https://github.com/gcol33/docrev/actions/workflows/ci.yml/badge.svg"
149
+ alt="CI" /></a></p>
150
+ </div>
151
+ <p>A CLI for writing documents in Markdown while collaborating
152
+ with Word users.</p>
153
+ <p>Write in <code>.md</code> files under version control; build
154
+ Word or PDF when you need to share. When reviewers return their
155
+ annotated copy, <code>rev sync</code> pulls the feedback into your
156
+ markdown sections, where you reply to comments, accept or reject
157
+ changes, and rebuild. Equations, figures, citations, and
158
+ cross-references survive both directions.</p>
159
+ <h2 id="the-problem">The Problem</h2>
160
+ <p>After a few rounds of feedback, the project directory looks
161
+ like this:</p>
162
+ <pre><code>manuscript_v1.docx
163
+ manuscript_v2_john_comments.docx
164
+ manuscript_v2_jane_comments.docx
165
+ manuscript_v3_merged_final.docx
166
+ manuscript_v3_merged_final_REAL.docx
167
+ manuscript_v3_merged_final_REAL_submitted.docx</code></pre>
168
+ <p>By the third filename, there’s no canonical version. Jane’s
169
+ comments are in one file, John’s track changes in another, your
170
+ reconciliation attempt in a third; whether you merged the right
171
+ sources depends on what you remember from last Tuesday.</p>
172
+ <p>docrev keeps the markdown as the canonical version, under git.
173
+ The DOCX is rebuilt each time you share; reviewer comments and
174
+ track changes come back into your section files when you sync,
175
+ where you reply to or accept them in the terminal.</p>
176
+ <h2 id="install">Install</h2>
177
+ <div class="sourceCode" id="cb2"><pre
178
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">npm</span> install <span class="at">-g</span> docrev</span></code></pre></div>
179
+ <p>Requires <a href="https://nodejs.org">Node.js</a> 18+. Building
180
+ DOCX or PDF needs <a href="https://pandoc.org">Pandoc</a>. For
181
+ complex PDFs (math, cross-references, journal styles), LaTeX is
182
+ also needed — see the <a
183
+ href="troubleshooting.html">Troubleshooting</a> page.</p>
184
+ <h2 id="quick-start">Quick Start</h2>
185
+ <p>Write in Markdown with citations and cross-references:</p>
186
+ <div class="sourceCode" id="cb3"><pre
187
+ class="sourceCode markdown"><code class="sourceCode markdown"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>Climate change poses significant challenges <span class="co">[</span><span class="ot">@IPCC2021</span><span class="co">]</span>. As shown in</span>
188
+ <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>@fig:temperature, global temperatures have risen steadily.</span>
189
+ <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a></span>
190
+ <span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="al">![Temperature anomalies](figures/temperature.png)</span>{#fig:temperature}</span></code></pre></div>
191
+ <p>Build and share:</p>
192
+ <div class="sourceCode" id="cb4"><pre
193
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build docx <span class="co"># → output/paper.docx</span></span>
194
+ <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build pdf <span class="co"># → output/paper.pdf</span></span></code></pre></div>
195
+ <p>When collaborators return the Word doc with track changes:</p>
196
+ <div class="sourceCode" id="cb5"><pre
197
+ class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> sync reviewed.docx <span class="co"># their comments → your markdown</span></span>
198
+ <span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> todo <span class="co"># list all pending comments</span></span>
199
+ <span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> reply methods.md <span class="at">-n</span> 1 <span class="at">-m</span> <span class="st">&quot;Clarified in revised text.&quot;</span></span>
200
+ <span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">rev</span> build docx <span class="at">--dual</span> <span class="co"># clean + annotated versions</span></span></code></pre></div>
201
+ <h2 id="documentation">Documentation</h2>
202
+ <div class="row g-3 mt-1">
203
+ <div class="col-sm-6">
204
+ <div class="doc-card position-relative">
205
+ <h5>
206
+ Get Started
207
+ </h5>
208
+ <p>
209
+ The full revision cycle: import, build, sync, reply, resolve,
210
+ rebuild, archive.
211
+ </p>
212
+ <p><a href="workflow.html" class="stretched-link text-decoration-none">Revision
213
+ Workflow →</a></p>
214
+ </div>
215
+ </div>
216
+ <div class="col-sm-6">
217
+ <div class="doc-card position-relative">
218
+ <h5>
219
+ Commands
220
+ </h5>
221
+ <p>
222
+ Complete reference for all <code>rev</code> commands, grouped by
223
+ task.
224
+ </p>
225
+ <p><a href="commands.html" class="stretched-link text-decoration-none">Command
226
+ Reference →</a></p>
227
+ </div>
228
+ </div>
229
+ <div class="col-sm-6">
230
+ <div class="doc-card position-relative">
231
+ <h5>
232
+ Configuration
233
+ </h5>
234
+ <p>
235
+ <code>rev.yaml</code> options, journal profiles, custom templates,
236
+ CSL styles.
237
+ </p>
238
+ <p><a href="configuration.html" class="stretched-link text-decoration-none">Configuration
239
+ →</a></p>
240
+ </div>
241
+ </div>
242
+ <div class="col-sm-6">
243
+ <div class="doc-card position-relative">
244
+ <h5>
245
+ Troubleshooting
246
+ </h5>
247
+ <p>
248
+ Common issues with installation, builds, imports, and
249
+ cross-references.
250
+ </p>
251
+ <p><a href="troubleshooting.html" class="stretched-link text-decoration-none">Troubleshooting
252
+ →</a></p>
253
+ </div>
254
+ </div>
255
+ </div>
256
+ </main>
257
+ </div>
258
+ </div>
259
+
260
+ <footer class="border-top py-3 mt-auto">
261
+ <div class="container d-flex justify-content-between align-items-center text-muted" style="font-size:.85rem">
262
+ <span>docrev 0.9.15</span>
263
+ <span>Built with <a href="https://pandoc.org" class="text-muted">pandoc</a></span>
264
+ </div>
265
+ </footer>
266
+
267
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
268
+ <script>
269
+ (function () {
270
+ var html = document.documentElement;
271
+ var sun = document.getElementById('icon-sun');
272
+ var moon = document.getElementById('icon-moon');
273
+ function apply(t) {
274
+ html.setAttribute('data-bs-theme', t);
275
+ sun.style.display = t === 'dark' ? 'none' : '';
276
+ moon.style.display = t === 'dark' ? '' : 'none';
277
+ }
278
+ apply(localStorage.getItem('docrev-theme') || 'light');
279
+ document.getElementById('theme-toggle').addEventListener('click', function () {
280
+ var next = html.getAttribute('data-bs-theme') === 'dark' ? 'light' : 'dark';
281
+ localStorage.setItem('docrev-theme', next);
282
+ apply(next);
283
+ });
284
+ })();
285
+ </script>
286
+
287
+ </body>
288
+ </html>