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
{{ message }}
Repository navigation
Commit fcdf0a1
Browse filesBrowse the repository at this point in the historyBrowse files
stlc-bot
committed
feat(scrape): add sourcePreference to choose between HTML conversion and published Markdown (#2010)
Copy file name to clipboardExpand all lines: pkg/cmd/web.go
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -502,13 +502,13 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
502
502
},
503
503
&requestflag.Flag[bool]{
504
504
Name: "include-images",
505
-
Usage: "Include image references in the Markdown output",
505
+
Usage: "Include image references in the Markdown output Only applies to `html-conversion` extractions.",
506
506
Default: false,
507
507
BodyPath: "includeImages",
508
508
},
509
509
&requestflag.Flag[bool]{
510
510
Name: "include-links",
511
-
Usage: "Preserve hyperlinks in the Markdown output",
511
+
Usage: "Preserve hyperlinks in the Markdown output Only applies to `html-conversion` extractions.",
512
512
Default: true,
513
513
BodyPath: "includeLinks",
514
514
},
@@ -548,10 +548,16 @@ var webWebCrawlMd = requestflag.WithInnerFlags(cli.Command{
548
548
},
549
549
&requestflag.Flag[bool]{
550
550
Name: "shorten-base64-images",
551
-
Usage: "Truncate base64-encoded image data in the Markdown output",
551
+
Usage: "Truncate base64-encoded image data in the Markdown output Only applies to `html-conversion` extractions.",
552
552
Default: true,
553
553
BodyPath: "shortenBase64Images",
554
554
},
555
+
&requestflag.Flag[[]string]{
556
+
Name: "source-preference",
557
+
Usage: "Where the Markdown should come from, in order of preference; the first usable source wins. `html-conversion` converts the page HTML, and counts as unusable when the conversion has almost no content (under 200 characters). `markdown-direct` uses the official Markdown version the page publishes through, returned as the site serves it. Defaults to `[\"html-conversion\", \"markdown-direct\"]`. With only `markdown-direct`, a page that publishes no Markdown fails with `NO_PUBLISHED_MARKDOWN` and is not billed. Requests with include or exclude selectors never use `markdown-direct`, so they must include `html-conversion`.",
0 commit comments