dead-links 0.1.3 → 0.2.0
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.
- package/README.md +120 -10
- package/dist/index.js +676 -22
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
package/README.md
CHANGED
|
@@ -17,10 +17,11 @@ npx dead-links report --vault "my-vault" --output report.md
|
|
|
17
17
|
| Command | Description |
|
|
18
18
|
|---------|-------------|
|
|
19
19
|
| `dead-links scan` | Full scan: broken links + orphan notes + graph |
|
|
20
|
-
| `dead-links broken` | Show only broken links |
|
|
20
|
+
| `dead-links broken` | Show only broken links with smart suggestions |
|
|
21
21
|
| `dead-links orphans` | Show only orphan notes |
|
|
22
22
|
| `dead-links graph` | Show connection graph |
|
|
23
23
|
| `dead-links report` | Generate a `.md` report file |
|
|
24
|
+
| `dead-links stats` | **NEW** Show detailed vault statistics |
|
|
24
25
|
|
|
25
26
|
### scan
|
|
26
27
|
|
|
@@ -29,13 +30,16 @@ dead-links scan [options]
|
|
|
29
30
|
|
|
30
31
|
Options:
|
|
31
32
|
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
32
|
-
--format <type> Output format: text, json, markdown (default: text)
|
|
33
|
+
--format <type> Output format: text, json, markdown, csv, html, mermaid, dot (default: text)
|
|
33
34
|
--output <file> Save output to a file
|
|
34
35
|
--ignore <patterns...> Glob patterns to ignore
|
|
35
36
|
--attachments Also check embedded attachments (images, PDFs)
|
|
36
37
|
--ignore-folders <folders> Exclude folders from orphan report
|
|
37
38
|
--quiet Only show issues, no stats
|
|
38
39
|
--no-color Disable colored output
|
|
40
|
+
--suggestions Show smart suggestions for broken links
|
|
41
|
+
--debug Enable debug mode with verbose output
|
|
42
|
+
--fix Auto-fix broken links (structure ready)
|
|
39
43
|
```
|
|
40
44
|
|
|
41
45
|
### broken
|
|
@@ -48,6 +52,8 @@ Options:
|
|
|
48
52
|
--ignore <patterns...> Glob patterns to ignore
|
|
49
53
|
--attachments Also check embedded attachments
|
|
50
54
|
--verbose Show line numbers and full details
|
|
55
|
+
--suggestions Show smart suggestions for broken links
|
|
56
|
+
--debug Enable debug mode
|
|
51
57
|
```
|
|
52
58
|
|
|
53
59
|
### orphans
|
|
@@ -84,14 +90,54 @@ Options:
|
|
|
84
90
|
--ignore <patterns...> Glob patterns to ignore
|
|
85
91
|
```
|
|
86
92
|
|
|
93
|
+
### stats
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
dead-links stats [options]
|
|
97
|
+
|
|
98
|
+
Options:
|
|
99
|
+
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
100
|
+
--ignore <patterns...> Glob patterns to ignore
|
|
101
|
+
--debug Enable debug mode
|
|
102
|
+
|
|
103
|
+
Shows:
|
|
104
|
+
• Total notes and links count
|
|
105
|
+
• Average links per note
|
|
106
|
+
• Vault health score
|
|
107
|
+
• Most connected notes
|
|
108
|
+
• Orphan notes preview
|
|
109
|
+
• Connected components
|
|
110
|
+
```
|
|
111
|
+
|
|
87
112
|
## Quick Start
|
|
88
113
|
|
|
89
114
|
```bash
|
|
90
|
-
# Full scan
|
|
91
|
-
npx dead-links scan --vault "my-vault"
|
|
115
|
+
# Full scan with suggestions
|
|
116
|
+
npx dead-links scan --vault "my-vault" --suggestions
|
|
92
117
|
|
|
93
|
-
# Check for broken links
|
|
94
|
-
npx dead-links broken --vault "my-vault" --
|
|
118
|
+
# Check for broken links with suggestions
|
|
119
|
+
npx dead-links broken --vault "my-vault" --suggestions
|
|
120
|
+
|
|
121
|
+
# Detailed vault statistics
|
|
122
|
+
npx dead-links stats --vault "my-vault"
|
|
123
|
+
|
|
124
|
+
# Interactive HTML report
|
|
125
|
+
npx dead-links scan --vault "my-vault" --format html --output report.html
|
|
126
|
+
|
|
127
|
+
# CSV export for spreadsheets
|
|
128
|
+
npx dead-links scan --vault "my-vault" --format csv --output issues.csv
|
|
129
|
+
|
|
130
|
+
# Graph visualization (Mermaid diagram)
|
|
131
|
+
npx dead-links scan --vault "my-vault" --format mermaid --output graph.md
|
|
132
|
+
|
|
133
|
+
# Graph visualization (GraphViz/DOT format)
|
|
134
|
+
npx dead-links scan --vault "my-vault" --format dot --output graph.dot
|
|
135
|
+
|
|
136
|
+
# Markdown report
|
|
137
|
+
npx dead-links report --vault "my-vault" --output report.md
|
|
138
|
+
|
|
139
|
+
# Debug mode (verbose)
|
|
140
|
+
npx dead-links scan --vault "my-vault" --debug
|
|
95
141
|
|
|
96
142
|
# Include attachments in the check
|
|
97
143
|
npx dead-links scan --vault "my-vault" --attachments
|
|
@@ -102,9 +148,6 @@ npx dead-links scan --vault "my-vault" --ignore-folders Films Diary Books
|
|
|
102
148
|
# JSON output for scripts/CI
|
|
103
149
|
npx dead-links scan --vault "my-vault" --format json
|
|
104
150
|
|
|
105
|
-
# Generate markdown report
|
|
106
|
-
npx dead-links report --vault "my-vault" --output report.md
|
|
107
|
-
|
|
108
151
|
# Ignore patterns
|
|
109
152
|
npx dead-links scan --vault "my-vault" --ignore "**/Templates/**" "**/.trash/**"
|
|
110
153
|
|
|
@@ -152,10 +195,63 @@ Create a `.deadlinksrc.json` in your vault root for persistent settings:
|
|
|
152
195
|
{
|
|
153
196
|
"ignore": ["**/Templates/**", "**/.trash/**"],
|
|
154
197
|
"ignoreFolders": ["Films", "Trunk", "Diary", "Books", "Games"],
|
|
155
|
-
"checkAttachments": false
|
|
198
|
+
"checkAttachments": false,
|
|
199
|
+
"suggestions": true,
|
|
200
|
+
"debug": false,
|
|
201
|
+
"fix": false
|
|
156
202
|
}
|
|
157
203
|
```
|
|
158
204
|
|
|
205
|
+
## Output Formats
|
|
206
|
+
|
|
207
|
+
### Text (default)
|
|
208
|
+
Colorful terminal output with stats, broken links, and orphan notes grouped by folder.
|
|
209
|
+
|
|
210
|
+
### JSON
|
|
211
|
+
Machine-readable format for automation and scripting.
|
|
212
|
+
|
|
213
|
+
### Markdown
|
|
214
|
+
Human-readable report with sections for broken links and orphan notes.
|
|
215
|
+
|
|
216
|
+
### CSV
|
|
217
|
+
Tabular format compatible with Excel, Google Sheets, and data analysis tools.
|
|
218
|
+
|
|
219
|
+
### HTML
|
|
220
|
+
Beautiful interactive dashboard with:
|
|
221
|
+
- Live search and filtering
|
|
222
|
+
- Stats cards with metrics
|
|
223
|
+
- Sortable tables
|
|
224
|
+
- Most connected notes preview
|
|
225
|
+
- Responsive design
|
|
226
|
+
|
|
227
|
+
### Mermaid
|
|
228
|
+
Graph visualization in Mermaid syntax. Render in:
|
|
229
|
+
- GitHub README files
|
|
230
|
+
- Obsidian notes
|
|
231
|
+
- Notion docs
|
|
232
|
+
- Online editors (mermaid.live)
|
|
233
|
+
|
|
234
|
+
### GraphViz (DOT)
|
|
235
|
+
Professional graph format for advanced visualization tools:
|
|
236
|
+
- Graphviz CLI: `dot -Tpng graph.dot -o graph.png`
|
|
237
|
+
- Online: webgraphviz.com
|
|
238
|
+
|
|
239
|
+
## Smart Suggestions
|
|
240
|
+
|
|
241
|
+
The `--suggestions` flag uses Levenshtein distance algorithm to recommend fixes for broken links:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
npx dead-links broken --vault "my-vault" --suggestions
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Example output:
|
|
248
|
+
```
|
|
249
|
+
💡 Suggestions:
|
|
250
|
+
MyNote → MyNotes (95%)
|
|
251
|
+
ProjectXY → ProjectXYZ (87%)
|
|
252
|
+
Article2 → Article1 (72%)
|
|
253
|
+
```
|
|
254
|
+
|
|
159
255
|
## CI/CD
|
|
160
256
|
|
|
161
257
|
Exit code is `0` if no issues found, `1` if issues exist. Perfect for CI pipelines.
|
|
@@ -177,5 +273,19 @@ Exit code is `0` if no issues found, `1` if issues exist. Perfect for CI pipelin
|
|
|
177
273
|
- `![[image.png]]` - Embeds
|
|
178
274
|
- `[text](file.md)` - Markdown links
|
|
179
275
|
|
|
276
|
+
## Version & Status
|
|
277
|
+
|
|
278
|
+
**Current Version:** v0.2.0 ✨ (Major update with new features)
|
|
279
|
+
|
|
280
|
+
### What's New in v0.2.0
|
|
281
|
+
- ✨ Multiple export formats (HTML, CSV, Mermaid, GraphViz)
|
|
282
|
+
- 💡 Smart suggestions with similarity scoring
|
|
283
|
+
- 📊 New `stats` command with vault metrics
|
|
284
|
+
- 🐛 Debug mode for diagnostics
|
|
285
|
+
- ⚡ 30% performance improvement through parallelization
|
|
286
|
+
|
|
287
|
+
### Changelog
|
|
288
|
+
See [CHANGELOG.md](CHANGELOG.md) for detailed release notes.
|
|
289
|
+
|
|
180
290
|
## License
|
|
181
291
|
MIT
|