feat(baoyu-url-to-markdown): add HTML snapshot saving and Defuddle fallback pipeline

- Save rendered HTML as sibling -captured.html file alongside markdown
- Defuddle-first conversion with automatic fallback to legacy Readability/selector extractor
- Add rawHtml, conversionMethod, fallbackReason to ConversionResult
- Log converter method and fallback reason in CLI output
This commit is contained in:
Jim Liu 宝玉
2026-03-06 21:18:21 -06:00
parent 3b031c7768
commit 5560db595a
7 changed files with 1130 additions and 20 deletions
@@ -0,0 +1,13 @@
{
"name": "baoyu-url-to-markdown-scripts",
"private": true,
"type": "module",
"dependencies": {
"@mozilla/readability": "^0.6.0",
"defuddle": "^0.10.0",
"jsdom": "^24.1.3",
"linkedom": "^0.18.12",
"turndown": "^7.2.2",
"turndown-plugin-gfm": "^1.0.2"
}
}