docrev 0.6.6 → 0.6.7

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 +8 -13
  2. package/bin/rev.js +8 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,24 +1,19 @@
1
1
  # docrev
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/docrev)](https://www.npmjs.com/package/docrev)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- **Write papers in plain text. Generate Word when needed.**
6
-
7
- ## Why
8
-
9
- Scientific papers go through many revision cycles. You send a Word document to collaborators, they add comments and track changes, you address the feedback and send it back. Then journal submission, reviewer comments, more revisions. After a few rounds, track changes become unreadable, you have fifteen versions of the same file, and nobody knows which one is current. Equations break when copying between documents. Figures get embedded at the wrong resolution or disappear entirely.
10
-
11
- docrev takes a different approach. You write in plain text using Markdown, a simple formatting syntax that takes ten minutes to learn. When you need to share with collaborators or submit to a journal, docrev generates a Word document or PDF. Your collaborators review and comment in Word as usual. When they send it back, docrev imports their feedback into your Markdown files. You address the comments, rebuild the document, and send it back. The cycle continues, but your source files stay clean and under version control.
12
-
13
- Your collaborators do not need to install anything or change how they work. They keep using Word. You handle the conversion on your end. The result is proper version history, equations that never break, figures that stay linked rather than embedded, and automated citation formatting.
6
+ Write scientific papers in Markdown. Generate Word documents for collaborators. Import their feedback. Repeat.
14
7
 
15
8
  ```
16
- Markdown files --> docrev --> Word/PDF
17
- ^ |
18
- | v
19
- +---- docrev <---- reviewer feedback
9
+ Markdown ──► docrev ──► Word/PDF ──► Collaborators
10
+ ▲ │
11
+ └─────────── docrev ◄─────────────────────┘
12
+ (import feedback)
20
13
  ```
21
14
 
15
+ Scientific papers go through many revision cycles with collaborators and reviewers. Track changes become unreadable, versions multiply, equations break when copying, figures get embedded at wrong resolutions. docrev keeps your source in plain Markdown under version control while generating Word documents for the review cycle. Your collaborators keep using Word as usual. You handle conversion on your end.
16
+
22
17
  ## Install
23
18
 
24
19
  ```bash
package/bin/rev.js CHANGED
@@ -1683,7 +1683,11 @@ program
1683
1683
  }
1684
1684
  }
1685
1685
 
1686
- // Step 1: Replace comments with markers
1686
+ // Step 1: Strip track changes but keep comments for Word conversion
1687
+ // This applies {++insertions++}, removes {--deletions--}, keeps {>>comments<<}
1688
+ markdown = stripAnnotations(markdown, { keepComments: true });
1689
+
1690
+ // Step 2: Replace comments with markers
1687
1691
  const spinMarkers = fmt.spinner('Preparing markers...').start();
1688
1692
  const { markedMarkdown, comments } = prepareMarkdownWithMarkers(markdown);
1689
1693
  spinMarkers.stop();
@@ -1691,11 +1695,11 @@ program
1691
1695
  if (comments.length === 0) {
1692
1696
  console.log(chalk.yellow('\nNo comments found - skipping comments DOCX'));
1693
1697
  } else {
1694
- // Step 2: Write marked markdown to temp file
1698
+ // Step 3: Write marked markdown to temp file
1695
1699
  const markedPath = path.join(dir, '.paper-marked.md');
1696
1700
  fs.writeFileSync(markedPath, markedMarkdown, 'utf-8');
1697
1701
 
1698
- // Step 3: Build DOCX from marked markdown using pandoc
1702
+ // Step 4: Build DOCX from marked markdown using pandoc
1699
1703
  const spinBuild = fmt.spinner('Building marked DOCX...').start();
1700
1704
  const markedDocxPath = path.join(dir, '.paper-marked.docx');
1701
1705
  const pandocResult = await runPandoc(markedPath, 'docx', config, { ...options, outputPath: markedDocxPath });
@@ -1704,7 +1708,7 @@ program
1704
1708
  if (!pandocResult.success) {
1705
1709
  console.error(chalk.yellow(`\nWarning: Could not build marked DOCX: ${pandocResult.error}`));
1706
1710
  } else {
1707
- // Step 4: Replace markers with comment ranges
1711
+ // Step 5: Replace markers with comment ranges
1708
1712
  const commentsDocxPath = docxResult.outputPath.replace(/\.docx$/, '_comments.docx');
1709
1713
  const spinInject = fmt.spinner('Injecting comments at markers...').start();
1710
1714
  const commentResult = await injectCommentsAtMarkers(markedDocxPath, comments, commentsDocxPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docrev",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
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",