defuddle-cli 0.1.4 → 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/dist/index.js +2 -1
- package/package.json +2 -2
- package/src/index.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -703,7 +703,8 @@ program
|
|
|
703
703
|
try {
|
|
704
704
|
// @ts-ignore - Module interop issue between ES modules and CommonJS
|
|
705
705
|
const defuddle = new Defuddle(doc, {
|
|
706
|
-
debug: options.debug
|
|
706
|
+
debug: options.debug,
|
|
707
|
+
...(source.startsWith('http') ? { url: source } : {})
|
|
707
708
|
});
|
|
708
709
|
const result = await defuddle.parse();
|
|
709
710
|
// If in debug mode, don't show content output
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "defuddle-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Command line interface for Defuddle - extract article content from web pages",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"chalk": "^5.3.0",
|
|
23
23
|
"commander": "^12.0.0",
|
|
24
|
-
"defuddle": "^0.
|
|
24
|
+
"defuddle": "^0.4.0",
|
|
25
25
|
"jsdom": "^24.0.0",
|
|
26
26
|
"turndown": "^7.2.0"
|
|
27
27
|
},
|
package/src/index.ts
CHANGED
|
@@ -802,7 +802,8 @@ program
|
|
|
802
802
|
try {
|
|
803
803
|
// @ts-ignore - Module interop issue between ES modules and CommonJS
|
|
804
804
|
const defuddle = new Defuddle(doc, {
|
|
805
|
-
debug: options.debug
|
|
805
|
+
debug: options.debug,
|
|
806
|
+
...(source.startsWith('http') ? { url: source } : {})
|
|
806
807
|
});
|
|
807
808
|
|
|
808
809
|
const result = await defuddle.parse();
|