You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -10,6 +10,7 @@ A Go CLI tool for extracting and analyzing code examples from MongoDB documentat
10
10
-[Extract Commands](#extract-commands)
11
11
-[Search Commands](#search-commands)
12
12
-[Analyze Commands](#analyze-commands)
13
+
-[Compare Commands](#compare-commands)
13
14
-[Development](#development)
14
15
-[Project Structure](#project-structure)
15
16
-[Adding New Commands](#adding-new-commands)
@@ -24,8 +25,9 @@ This CLI tool helps maintain code quality across MongoDB's documentation by:
24
25
1.**Extracting code examples** from RST files into individual, testable files
25
26
2.**Searching extracted code** for specific patterns or substrings
26
27
3.**Analyzing include relationships** to understand file dependencies
27
-
4.**Following include directives** to process entire documentation trees
28
-
5.**Handling MongoDB-specific conventions** like steps files, extracts, and template variables
28
+
4.**Comparing file contents** across documentation versions to identify differences
29
+
5.**Following include directives** to process entire documentation trees
30
+
6.**Handling MongoDB-specific conventions** like steps files, extracts, and template variables
29
31
30
32
## Installation
31
33
@@ -55,8 +57,10 @@ audit-cli
55
57
│ └── code-examples
56
58
├── search # Search through extracted content
57
59
│ └── find-string
58
-
└── analyze # Analyze RST file structures
59
-
└── includes
60
+
├── analyze # Analyze RST file structures
61
+
│ └── includes
62
+
└── compare # Compare files across versions
63
+
└── file-contents
60
64
```
61
65
62
66
### Extract Commands
@@ -238,6 +242,166 @@ This command helps writers:
238
242
239
243
The total file count represents **unique files** discovered through include directives. If a file is included multiple times (e.g., file A includes file C, and file B also includes file C), it is counted only once in the total. However, the tree view will show it in all locations where it appears, with subsequent occurrences marked as circular includes in verbose mode.
240
244
245
+
### Compare Commands
246
+
247
+
#### `compare file-contents`
248
+
249
+
Compare file contents to identify differences between files. Supports two modes:
250
+
1.**Direct comparison** - Compare two specific files
251
+
2.**Version comparison** - Compare the same file across multiple documentation versions
252
+
253
+
**Use Cases:**
254
+
255
+
This command helps writers:
256
+
- Identify content drift across documentation versions
257
+
- Verify that updates have been applied consistently
258
+
- Scope maintenance work when updating shared content
Files that don't exist in certain versions are reported separately and do not cause errors. This is expected behavior since features may be added or removed across versions.
0 commit comments