html-to-markdown 2.11.1__cp310-abi3-win_amd64.whl → 2.11.3__cp310-abi3-win_amd64.whl
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.
- html_to_markdown/__init__.py +1 -1
- html_to_markdown/_html_to_markdown.pyd +0 -0
- html_to_markdown/_html_to_markdown.pyi +107 -5
- html_to_markdown/api.py +2 -5
- html_to_markdown/bin/html-to-markdown.exe +0 -0
- {html_to_markdown-2.11.1.data → html_to_markdown-2.11.3.data}/scripts/html-to-markdown.exe +0 -0
- {html_to_markdown-2.11.1.dist-info → html_to_markdown-2.11.3.dist-info}/METADATA +1 -1
- html_to_markdown-2.11.3.dist-info/RECORD +17 -0
- html_to_markdown-2.11.1.dist-info/RECORD +0 -17
- {html_to_markdown-2.11.1.dist-info → html_to_markdown-2.11.3.dist-info}/WHEEL +0 -0
- {html_to_markdown-2.11.1.dist-info → html_to_markdown-2.11.3.dist-info}/licenses/LICENSE +0 -0
html_to_markdown/__init__.py
CHANGED
|
Binary file
|
|
@@ -1,22 +1,124 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import Literal, TypedDict
|
|
2
2
|
|
|
3
3
|
class PreprocessingOptions:
|
|
4
|
-
|
|
4
|
+
enabled: bool
|
|
5
|
+
preset: Literal["minimal", "standard", "aggressive"]
|
|
6
|
+
remove_navigation: bool
|
|
7
|
+
remove_forms: bool
|
|
8
|
+
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
*,
|
|
12
|
+
enabled: bool = False,
|
|
13
|
+
preset: Literal["minimal", "standard", "aggressive"] = "standard",
|
|
14
|
+
remove_navigation: bool = True,
|
|
15
|
+
remove_forms: bool = True,
|
|
16
|
+
) -> None: ...
|
|
5
17
|
|
|
6
18
|
class ConversionOptions:
|
|
7
|
-
|
|
19
|
+
heading_style: Literal["underlined", "atx", "atx_closed"]
|
|
20
|
+
list_indent_type: Literal["spaces", "tabs"]
|
|
21
|
+
list_indent_width: int
|
|
22
|
+
bullets: str
|
|
23
|
+
strong_em_symbol: str
|
|
24
|
+
escape_asterisks: bool
|
|
25
|
+
escape_underscores: bool
|
|
26
|
+
escape_misc: bool
|
|
27
|
+
escape_ascii: bool
|
|
28
|
+
code_language: str
|
|
29
|
+
autolinks: bool
|
|
30
|
+
default_title: bool
|
|
31
|
+
br_in_tables: bool
|
|
32
|
+
hocr_spatial_tables: bool
|
|
33
|
+
highlight_style: Literal["double-equal", "html", "bold", "none"]
|
|
34
|
+
extract_metadata: bool
|
|
35
|
+
whitespace_mode: Literal["normalized", "strict"]
|
|
36
|
+
strip_newlines: bool
|
|
37
|
+
wrap: bool
|
|
38
|
+
wrap_width: int
|
|
39
|
+
convert_as_inline: bool
|
|
40
|
+
sub_symbol: str
|
|
41
|
+
sup_symbol: str
|
|
42
|
+
newline_style: Literal["spaces", "backslash"]
|
|
43
|
+
code_block_style: Literal["indented", "backticks", "tildes"]
|
|
44
|
+
keep_inline_images_in: list[str]
|
|
45
|
+
preprocessing: PreprocessingOptions
|
|
46
|
+
encoding: str
|
|
47
|
+
debug: bool
|
|
48
|
+
strip_tags: list[str]
|
|
49
|
+
preserve_tags: list[str]
|
|
50
|
+
|
|
51
|
+
def __init__(
|
|
52
|
+
self,
|
|
53
|
+
*,
|
|
54
|
+
heading_style: Literal["underlined", "atx", "atx_closed"] = "underlined",
|
|
55
|
+
list_indent_type: Literal["spaces", "tabs"] = "spaces",
|
|
56
|
+
list_indent_width: int = 4,
|
|
57
|
+
bullets: str = "*+-",
|
|
58
|
+
strong_em_symbol: str = "*",
|
|
59
|
+
escape_asterisks: bool = False,
|
|
60
|
+
escape_underscores: bool = False,
|
|
61
|
+
escape_misc: bool = False,
|
|
62
|
+
escape_ascii: bool = False,
|
|
63
|
+
code_language: str = "",
|
|
64
|
+
autolinks: bool = True,
|
|
65
|
+
default_title: bool = False,
|
|
66
|
+
br_in_tables: bool = False,
|
|
67
|
+
hocr_spatial_tables: bool = True,
|
|
68
|
+
highlight_style: Literal["double-equal", "html", "bold", "none"] = "double-equal",
|
|
69
|
+
extract_metadata: bool = True,
|
|
70
|
+
whitespace_mode: Literal["normalized", "strict"] = "normalized",
|
|
71
|
+
strip_newlines: bool = False,
|
|
72
|
+
wrap: bool = False,
|
|
73
|
+
wrap_width: int = 80,
|
|
74
|
+
convert_as_inline: bool = False,
|
|
75
|
+
sub_symbol: str = "",
|
|
76
|
+
sup_symbol: str = "",
|
|
77
|
+
newline_style: Literal["spaces", "backslash"] = "spaces",
|
|
78
|
+
code_block_style: Literal["indented", "backticks", "tildes"] = "indented",
|
|
79
|
+
keep_inline_images_in: list[str] = [],
|
|
80
|
+
preprocessing: PreprocessingOptions | None = None,
|
|
81
|
+
encoding: str = "utf-8",
|
|
82
|
+
debug: bool = False,
|
|
83
|
+
strip_tags: list[str] = [],
|
|
84
|
+
preserve_tags: list[str] = [],
|
|
85
|
+
) -> None: ...
|
|
8
86
|
|
|
9
87
|
class InlineImageConfig:
|
|
10
|
-
|
|
88
|
+
max_decoded_size_bytes: int
|
|
89
|
+
filename_prefix: str | None
|
|
90
|
+
capture_svg: bool
|
|
91
|
+
infer_dimensions: bool
|
|
92
|
+
|
|
93
|
+
def __init__(
|
|
94
|
+
self,
|
|
95
|
+
max_decoded_size_bytes: int = ...,
|
|
96
|
+
filename_prefix: str | None = None,
|
|
97
|
+
capture_svg: bool = True,
|
|
98
|
+
infer_dimensions: bool = False,
|
|
99
|
+
) -> None: ...
|
|
11
100
|
|
|
12
101
|
class ConversionOptionsHandle:
|
|
13
102
|
def __init__(self, options: ConversionOptions | None = None) -> None: ...
|
|
14
103
|
|
|
104
|
+
class InlineImage(TypedDict):
|
|
105
|
+
data: bytes
|
|
106
|
+
format: str
|
|
107
|
+
filename: str | None
|
|
108
|
+
description: str | None
|
|
109
|
+
dimensions: tuple[int, int] | None
|
|
110
|
+
source: Literal["img_data_uri", "svg_element"]
|
|
111
|
+
attributes: dict[str, str]
|
|
112
|
+
|
|
113
|
+
class InlineImageWarning(TypedDict):
|
|
114
|
+
index: int
|
|
115
|
+
message: str
|
|
116
|
+
|
|
15
117
|
def convert(html: str, options: ConversionOptions | None = None) -> str: ...
|
|
16
118
|
def convert_with_inline_images(
|
|
17
119
|
html: str,
|
|
18
120
|
options: ConversionOptions | None = None,
|
|
19
121
|
image_config: InlineImageConfig | None = None,
|
|
20
|
-
) -> tuple[str, list[
|
|
122
|
+
) -> tuple[str, list[InlineImage], list[InlineImageWarning]]: ...
|
|
21
123
|
def create_options_handle(options: ConversionOptions | None = None) -> ConversionOptionsHandle: ...
|
|
22
124
|
def convert_with_options_handle(html: str, handle: ConversionOptionsHandle) -> str: ...
|
html_to_markdown/api.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Literal, TypedDict
|
|
5
|
+
from typing import Literal, TypedDict
|
|
6
6
|
|
|
7
7
|
import html_to_markdown._html_to_markdown as _rust
|
|
8
8
|
from html_to_markdown._html_to_markdown import (
|
|
@@ -114,10 +114,7 @@ def convert_with_inline_images(
|
|
|
114
114
|
image_config = InlineImageConfig()
|
|
115
115
|
|
|
116
116
|
rust_options = _to_rust_options(options, preprocessing)
|
|
117
|
-
markdown, images, warnings =
|
|
118
|
-
"tuple[str, list[InlineImage], list[InlineImageWarning]]",
|
|
119
|
-
_rust.convert_with_inline_images(html, rust_options, image_config),
|
|
120
|
-
)
|
|
117
|
+
markdown, images, warnings = _rust.convert_with_inline_images(html, rust_options, image_config)
|
|
121
118
|
return markdown, list(images), list(warnings)
|
|
122
119
|
|
|
123
120
|
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
html_to_markdown-2.11.3.data/scripts/html-to-markdown.exe,sha256=_iZY3LHF3GkM2R-oAf29Ragl4Sm3Oq-6jHXiQeK-Nag,7449088
|
|
2
|
+
html_to_markdown-2.11.3.dist-info/METADATA,sha256=xqeBq2RZzZ866fcBqxuLvcFSdBNz25_M5BneiIEWBWE,12018
|
|
3
|
+
html_to_markdown-2.11.3.dist-info/WHEEL,sha256=K5qNJKkFQL1BjzLwCu0_aKvm-imQhTUn0FEds_cjhx4,96
|
|
4
|
+
html_to_markdown-2.11.3.dist-info/licenses/LICENSE,sha256=QhKFMkQLa4mSUlOsyG9VElzC7GYbAKtiS_EwOCyH-b4,1107
|
|
5
|
+
html_to_markdown/__init__.py,sha256=1OQz6Ap5bDnLcHkXOx8CLp6VCJg0p4pBcVp_GI1H9ow,1565
|
|
6
|
+
html_to_markdown/__main__.py,sha256=5objj9lB7hhpSpZsDok5tv9o9yztVR63Ccww-pXsAyY,343
|
|
7
|
+
html_to_markdown/_html_to_markdown.pyd,sha256=nxfpSklcSuIyHUDxB_mIeqFLZMSKr_mkhB0C30K7RBI,3970048
|
|
8
|
+
html_to_markdown/_html_to_markdown.pyi,sha256=qJTXGhnR_bGbPywDl-MWDtiQKa4Ba_lf-uHm35zSoB0,4228
|
|
9
|
+
html_to_markdown/api.py,sha256=BNEL9xvRJbALjHhs4KZF8kIoQ5mbSG2c0JOwwdvn-kg,5144
|
|
10
|
+
html_to_markdown/bin/html-to-markdown.exe,sha256=_iZY3LHF3GkM2R-oAf29Ragl4Sm3Oq-6jHXiQeK-Nag,7449088
|
|
11
|
+
html_to_markdown/cli.py,sha256=z59l8sF8wIRRzJtUd-tXgqiC0WTqkTjzl-df8Ey_oQ0,67
|
|
12
|
+
html_to_markdown/cli_proxy.py,sha256=Y0Z98U0EMDqIRtdEkcHa1dVntWkw69maczeksr-Cq28,4000
|
|
13
|
+
html_to_markdown/exceptions.py,sha256=31VqpPi4JLGv7lI2481Z4f2s5ejYmq97c3s-WFFkXVU,2443
|
|
14
|
+
html_to_markdown/options.py,sha256=iDEIfxxZlSHDM3V-Sr-XVxYLC1mzvuic56jSycYvQvY,5224
|
|
15
|
+
html_to_markdown/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
html_to_markdown/v1_compat.py,sha256=qBfWRsXxox4I4Mm2kzvxEvqEKZ8DwYMQK-bbLHTUk-A,8253
|
|
17
|
+
html_to_markdown-2.11.3.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
html_to_markdown-2.11.1.data/scripts/html-to-markdown.exe,sha256=80Ouejv1q4vPPEIXx4AQlNx9Sop03yxtJBMJTIwvX0A,7452160
|
|
2
|
-
html_to_markdown-2.11.1.dist-info/METADATA,sha256=rIUPMteA9pP5KFf9doyjV_1VdLGsYVuHb6ScCeWHoHU,12018
|
|
3
|
-
html_to_markdown-2.11.1.dist-info/WHEEL,sha256=K5qNJKkFQL1BjzLwCu0_aKvm-imQhTUn0FEds_cjhx4,96
|
|
4
|
-
html_to_markdown-2.11.1.dist-info/licenses/LICENSE,sha256=QhKFMkQLa4mSUlOsyG9VElzC7GYbAKtiS_EwOCyH-b4,1107
|
|
5
|
-
html_to_markdown/__init__.py,sha256=zhpAU7eV3MykPyYXCyNI8po-Znlgandh5uTMcXrq6As,1565
|
|
6
|
-
html_to_markdown/__main__.py,sha256=5objj9lB7hhpSpZsDok5tv9o9yztVR63Ccww-pXsAyY,343
|
|
7
|
-
html_to_markdown/_html_to_markdown.pyd,sha256=uyA8qGCfqZLdJOGBXoPh94a8Ef6ch0rb0lg15Dz3M2w,3970048
|
|
8
|
-
html_to_markdown/_html_to_markdown.pyi,sha256=lh2hj6GyGx71fJzZPD5giZbO6XQYYBIlfQUJq4MwVPQ,878
|
|
9
|
-
html_to_markdown/api.py,sha256=xxdVbIZjuSewhsgntdfY5DFJaYIEZITz2TBieqUCR3A,5241
|
|
10
|
-
html_to_markdown/bin/html-to-markdown.exe,sha256=80Ouejv1q4vPPEIXx4AQlNx9Sop03yxtJBMJTIwvX0A,7452160
|
|
11
|
-
html_to_markdown/cli.py,sha256=z59l8sF8wIRRzJtUd-tXgqiC0WTqkTjzl-df8Ey_oQ0,67
|
|
12
|
-
html_to_markdown/cli_proxy.py,sha256=Y0Z98U0EMDqIRtdEkcHa1dVntWkw69maczeksr-Cq28,4000
|
|
13
|
-
html_to_markdown/exceptions.py,sha256=31VqpPi4JLGv7lI2481Z4f2s5ejYmq97c3s-WFFkXVU,2443
|
|
14
|
-
html_to_markdown/options.py,sha256=iDEIfxxZlSHDM3V-Sr-XVxYLC1mzvuic56jSycYvQvY,5224
|
|
15
|
-
html_to_markdown/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
html_to_markdown/v1_compat.py,sha256=qBfWRsXxox4I4Mm2kzvxEvqEKZ8DwYMQK-bbLHTUk-A,8253
|
|
17
|
-
html_to_markdown-2.11.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|