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 eb22b56
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: pkg/cmd/parse.go
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -37,19 +37,19 @@ var parseHandle = requestflag.WithInnerFlags(cli.Command{
37
37
Usage: "Optional file extension hint, such as pdf, docx, xlsx, pptx, html, json, csv, md, py, rtf, jpg, png, or txt.",
38
38
QueryPath: "extension",
39
39
},
40
-
&requestflag.Flag[any]{
40
+
&requestflag.Flag[bool]{
41
41
Name: "include-images",
42
42
Usage: "Include image references in Markdown output",
43
43
Default: false,
44
44
QueryPath: "includeImages",
45
45
},
46
-
&requestflag.Flag[any]{
46
+
&requestflag.Flag[bool]{
47
47
Name: "include-links",
48
48
Usage: "Preserve hyperlinks in Markdown output",
49
49
Default: true,
50
50
QueryPath: "includeLinks",
51
51
},
52
-
&requestflag.Flag[any]{
52
+
&requestflag.Flag[bool]{
53
53
Name: "ocr",
54
54
Usage: "When true for PDF inputs, OCR the selected pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. pdf.start/pdf.end limit the inclusive page range. Billed at 1 credit per page OCR actually recovered, on top of the base request cost. When false, no OCR runs.",
55
55
Default: false,
@@ -61,7 +61,7 @@ var parseHandle = requestflag.WithInnerFlags(cli.Command{
61
61
Default: map[string]any{},
62
62
QueryPath: "pdf",
63
63
},
64
-
&requestflag.Flag[any]{
64
+
&requestflag.Flag[bool]{
65
65
Name: "shorten-base64-images",
66
66
Usage: "Shorten base64-encoded image data in the Markdown output",
67
67
Default: true,
@@ -72,7 +72,7 @@ var parseHandle = requestflag.WithInnerFlags(cli.Command{
72
72
Usage: "Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.",
73
73
QueryPath: "tags",
74
74
},
75
-
&requestflag.Flag[any]{
75
+
&requestflag.Flag[bool]{
76
76
Name: "use-main-content-only",
77
77
Usage: "Extract only the main content from HTML-like inputs",
Copy file name to clipboardExpand all lines: pkg/cmd/web.go
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -265,7 +265,7 @@ var webScreenshot = requestflag.WithInnerFlags(cli.Command{
265
265
Usage: "Optional parameter to determine screenshot type. If 'true', takes a full page screenshot capturing all content. If 'false' or not provided, takes a viewport screenshot (standard browser view).",
266
266
QueryPath: "fullScreenshot",
267
267
},
268
-
&requestflag.Flag[any]{
268
+
&requestflag.Flag[bool]{
269
269
Name: "handle-cookie-popup",
270
270
Usage: "Optional parameter to control cookie/consent popup handling. If 'true', we dismiss cookie banner before capture. If 'false' or not provided, captures the page without that step.",
271
271
Default: false,
@@ -630,7 +630,7 @@ var webWebScrapeHTML = requestflag.WithInnerFlags(cli.Command{
630
630
Usage: "Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers[X-Custom]=value. When provided, caching is bypassed: the result is neither read from nor written to cache.",
631
631
QueryPath: "headers",
632
632
},
633
-
&requestflag.Flag[any]{
633
+
&requestflag.Flag[bool]{
634
634
Name: "include-frames",
635
635
Usage: "When true, iframes are rendered inline into the returned HTML.",
636
636
Default: false,
@@ -653,7 +653,7 @@ var webWebScrapeHTML = requestflag.WithInnerFlags(cli.Command{
Usage: "When true, waits briefly for CSS and transition animations to settle before extracting HTML. Defaults to false. This adds a bit of latency in exchange for more stable output on animated pages.",
659
659
Default: false,
@@ -669,7 +669,7 @@ var webWebScrapeHTML = requestflag.WithInnerFlags(cli.Command{
669
669
Usage: "Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).",
670
670
QueryPath: "timeoutMS",
671
671
},
672
-
&requestflag.Flag[any]{
672
+
&requestflag.Flag[bool]{
673
673
Name: "use-main-content-only",
674
674
Usage: "When true, return only the page's main content in the HTML response, excluding headers, footers, sidebars, and navigation when detectable.",
675
675
Default: false,
@@ -696,12 +696,12 @@ var webWebScrapeHTML = requestflag.WithInnerFlags(cli.Command{
696
696
Usage: "Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Must be greater than or equal to start when both are provided.",
697
697
InnerField: "end",
698
698
},
699
-
&requestflag.InnerFlag[any]{
699
+
&requestflag.InnerFlag[bool]{
700
700
Name: "pdf.ocr",
701
701
Usage: "When true, OCR the selected PDF pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. Billed at 1 credit per page OCR actually recovered, on top of the base request cost. When false, no OCR runs.",
702
702
InnerField: "ocr",
703
703
},
704
-
&requestflag.InnerFlag[any]{
704
+
&requestflag.InnerFlag[bool]{
705
705
Name: "pdf.should-parse",
706
706
Usage: "When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and a 400 PDF_SKIPPED is returned.",
707
707
InnerField: "shouldParse",
@@ -730,7 +730,7 @@ var webWebScrapeImages = requestflag.WithInnerFlags(cli.Command{
730
730
Usage: "Optional browser actions executed in array order after the page loads and before content is captured. Requires a paid plan. Send a JSON array in the query parameter. Maximum: 5 actions.",
731
731
QueryPath: "actions",
732
732
},
733
-
&requestflag.Flag[any]{
733
+
&requestflag.Flag[bool]{
734
734
Name: "dedupe",
735
735
Usage: "When true, visually duplicate images are removed: every image is loaded and perceptually hashed, and only the highest-resolution copy of each duplicate group is kept. Images that cannot be downloaded or hashed are kept. Default: false.",
736
736
Default: false,
@@ -772,12 +772,12 @@ var webWebScrapeImages = requestflag.WithInnerFlags(cli.Command{
772
772
HideHelpCommand: true,
773
773
}, map[string][]requestflag.HasOuterFlag{
774
774
"enrichment": {
775
-
&requestflag.InnerFlag[any]{
775
+
&requestflag.InnerFlag[bool]{
776
776
Name: "enrichment.classification",
777
777
Usage: "Classify each image by visual asset type.",
778
778
InnerField: "classification",
779
779
},
780
-
&requestflag.InnerFlag[any]{
780
+
&requestflag.InnerFlag[bool]{
781
781
Name: "enrichment.hosted-url",
782
782
Usage: "Host materializable images on the Brand.dev CDN and return their URL and MIME type.",
783
783
InnerField: "hostedUrl",
@@ -787,7 +787,7 @@ var webWebScrapeImages = requestflag.WithInnerFlags(cli.Command{
787
787
Usage: "Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.",
788
788
InnerField: "maxTimePerMs",
789
789
},
790
-
&requestflag.InnerFlag[any]{
790
+
&requestflag.InnerFlag[bool]{
791
791
Name: "enrichment.resolution",
792
792
Usage: "Measure image width and height when possible.",
793
793
InnerField: "resolution",
@@ -826,25 +826,25 @@ var webWebScrapeMd = requestflag.WithInnerFlags(cli.Command{
826
826
Usage: "Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers[X-Custom]=value. When provided, caching is bypassed: the result is neither read from nor written to cache.",
827
827
QueryPath: "headers",
828
828
},
829
-
&requestflag.Flag[any]{
829
+
&requestflag.Flag[bool]{
830
830
Name: "include-frames",
831
831
Usage: "When true, the contents of iframes are rendered to Markdown.",
832
832
Default: false,
833
833
QueryPath: "includeFrames",
834
834
},
835
-
&requestflag.Flag[any]{
835
+
&requestflag.Flag[bool]{
836
836
Name: "include-html",
837
837
Usage: "When true, the response also includes an `html` field with the page HTML the Markdown was converted from — the same body the Scrape HTML endpoint returns for the equivalent request.",
838
838
Default: false,
839
839
QueryPath: "includeHTML",
840
840
},
841
-
&requestflag.Flag[any]{
841
+
&requestflag.Flag[bool]{
842
842
Name: "include-images",
843
843
Usage: "Include image references in Markdown output",
844
844
Default: false,
845
845
QueryPath: "includeImages",
846
846
},
847
-
&requestflag.Flag[any]{
847
+
&requestflag.Flag[bool]{
848
848
Name: "include-links",
849
849
Usage: "Preserve hyperlinks in Markdown output",
850
850
Default: true,
@@ -867,13 +867,13 @@ var webWebScrapeMd = requestflag.WithInnerFlags(cli.Command{
Usage: "When true, waits briefly for CSS and transition animations to settle before converting to Markdown. Defaults to false. This adds a bit of latency in exchange for more stable output on animated pages.",
873
873
Default: false,
874
874
QueryPath: "settleAnimations",
875
875
},
876
-
&requestflag.Flag[any]{
876
+
&requestflag.Flag[bool]{
877
877
Name: "shorten-base64-images",
878
878
Usage: "Shorten base64-encoded image data in the Markdown output",
879
879
Default: true,
@@ -889,7 +889,7 @@ var webWebScrapeMd = requestflag.WithInnerFlags(cli.Command{
889
889
Usage: "Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).",
890
890
QueryPath: "timeoutMS",
891
891
},
892
-
&requestflag.Flag[any]{
892
+
&requestflag.Flag[bool]{
893
893
Name: "use-main-content-only",
894
894
Usage: "Extract only the main content of the page, excluding headers, footers, sidebars, and navigation",
895
895
Default: false,
@@ -916,12 +916,12 @@ var webWebScrapeMd = requestflag.WithInnerFlags(cli.Command{
916
916
Usage: "Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Must be greater than or equal to start when both are provided.",
917
917
InnerField: "end",
918
918
},
919
-
&requestflag.InnerFlag[any]{
919
+
&requestflag.InnerFlag[bool]{
920
920
Name: "pdf.ocr",
921
921
Usage: "When true, OCR the selected PDF pages that have no usable text layer (scans), replacing each recovered page's text with the OCR result while pages with a real text layer keep it. Billed at 1 credit per page OCR actually recovered, on top of the base request cost. When false, no OCR runs.",
922
922
InnerField: "ocr",
923
923
},
924
-
&requestflag.InnerFlag[any]{
924
+
&requestflag.InnerFlag[bool]{
925
925
Name: "pdf.should-parse",
926
926
Usage: "When true, PDF URLs are fetched and parsed. When false, PDF URLs are skipped and a 400 PDF_SKIPPED is returned.",
0 commit comments