innertext 0.2.2__tar.gz → 0.2.3__tar.gz
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.
- {innertext-0.2.2 → innertext-0.2.3}/Cargo.lock +4 -4
- {innertext-0.2.2 → innertext-0.2.3}/Cargo.toml +1 -1
- {innertext-0.2.2 → innertext-0.2.3}/PKG-INFO +21 -1
- {innertext-0.2.2/bindings/innertext-python → innertext-0.2.3}/README.md +20 -0
- {innertext-0.2.2 → innertext-0.2.3/bindings/innertext-python}/README.md +20 -0
- {innertext-0.2.2 → innertext-0.2.3}/bindings/innertext-python/src/lib.rs +1 -1
- {innertext-0.2.2 → innertext-0.2.3}/pyproject.toml +2 -1
- innertext-0.2.3/python/innertext/__init__.py +8 -0
- innertext-0.2.3/python/innertext/py.typed +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/bindings/innertext-python/Cargo.toml +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/Cargo.toml +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/src/css.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/src/inner_text.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/src/lib.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/src/model.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/src/render.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/src/text_content.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/tests/chromium_parity.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/crates/innertext-core/tests/spec_behavior.rs +0 -0
- {innertext-0.2.2 → innertext-0.2.3}/python/innertext/__init__.pyi +0 -0
|
@@ -115,7 +115,7 @@ dependencies = [
|
|
|
115
115
|
|
|
116
116
|
[[package]]
|
|
117
117
|
name = "innertext-core"
|
|
118
|
-
version = "0.2.
|
|
118
|
+
version = "0.2.3"
|
|
119
119
|
dependencies = [
|
|
120
120
|
"html5ever",
|
|
121
121
|
"markup5ever",
|
|
@@ -128,7 +128,7 @@ dependencies = [
|
|
|
128
128
|
|
|
129
129
|
[[package]]
|
|
130
130
|
name = "innertext-java"
|
|
131
|
-
version = "0.2.
|
|
131
|
+
version = "0.2.3"
|
|
132
132
|
dependencies = [
|
|
133
133
|
"innertext-core",
|
|
134
134
|
"jni",
|
|
@@ -137,7 +137,7 @@ dependencies = [
|
|
|
137
137
|
|
|
138
138
|
[[package]]
|
|
139
139
|
name = "innertext-node"
|
|
140
|
-
version = "0.2.
|
|
140
|
+
version = "0.2.3"
|
|
141
141
|
dependencies = [
|
|
142
142
|
"innertext-core",
|
|
143
143
|
"napi",
|
|
@@ -146,7 +146,7 @@ dependencies = [
|
|
|
146
146
|
|
|
147
147
|
[[package]]
|
|
148
148
|
name = "innertext-python"
|
|
149
|
-
version = "0.2.
|
|
149
|
+
version = "0.2.3"
|
|
150
150
|
dependencies = [
|
|
151
151
|
"innertext-core",
|
|
152
152
|
"pyo3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: innertext
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Environment :: Console
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -55,6 +55,26 @@ print(innertext.inner_text(html)) # "Hello World"
|
|
|
55
55
|
print(innertext.text_content(html)) # "Hello hidden console.log("not shown")"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
## Packaging Notes
|
|
59
|
+
|
|
60
|
+
The published Python package uses a two-layer layout:
|
|
61
|
+
- `innertext` is a regular Python package with a runtime `__init__.py`
|
|
62
|
+
- the compiled Rust extension is loaded as `innertext._innertext`
|
|
63
|
+
|
|
64
|
+
This avoids namespace-package import issues and ensures `import innertext`
|
|
65
|
+
always exposes `inner_text`, `outer_text`, and `text_content`.
|
|
66
|
+
|
|
67
|
+
## Type Hints
|
|
68
|
+
|
|
69
|
+
This package ships with PEP 561-compatible typing metadata:
|
|
70
|
+
- `innertext/__init__.pyi` defines the public API types
|
|
71
|
+
- `innertext/py.typed` marks the package as typed
|
|
72
|
+
|
|
73
|
+
Type checkers such as mypy and pyright can therefore infer:
|
|
74
|
+
- `inner_text(html: str) -> str`
|
|
75
|
+
- `outer_text(html: str) -> str`
|
|
76
|
+
- `text_content(html: str) -> str`
|
|
77
|
+
|
|
58
78
|
## API
|
|
59
79
|
|
|
60
80
|
### Functions
|
|
@@ -27,6 +27,26 @@ print(innertext.inner_text(html)) # "Hello World"
|
|
|
27
27
|
print(innertext.text_content(html)) # "Hello hidden console.log("not shown")"
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Packaging Notes
|
|
31
|
+
|
|
32
|
+
The published Python package uses a two-layer layout:
|
|
33
|
+
- `innertext` is a regular Python package with a runtime `__init__.py`
|
|
34
|
+
- the compiled Rust extension is loaded as `innertext._innertext`
|
|
35
|
+
|
|
36
|
+
This avoids namespace-package import issues and ensures `import innertext`
|
|
37
|
+
always exposes `inner_text`, `outer_text`, and `text_content`.
|
|
38
|
+
|
|
39
|
+
## Type Hints
|
|
40
|
+
|
|
41
|
+
This package ships with PEP 561-compatible typing metadata:
|
|
42
|
+
- `innertext/__init__.pyi` defines the public API types
|
|
43
|
+
- `innertext/py.typed` marks the package as typed
|
|
44
|
+
|
|
45
|
+
Type checkers such as mypy and pyright can therefore infer:
|
|
46
|
+
- `inner_text(html: str) -> str`
|
|
47
|
+
- `outer_text(html: str) -> str`
|
|
48
|
+
- `text_content(html: str) -> str`
|
|
49
|
+
|
|
30
50
|
## API
|
|
31
51
|
|
|
32
52
|
### Functions
|
|
@@ -27,6 +27,26 @@ print(innertext.inner_text(html)) # "Hello World"
|
|
|
27
27
|
print(innertext.text_content(html)) # "Hello hidden console.log("not shown")"
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Packaging Notes
|
|
31
|
+
|
|
32
|
+
The published Python package uses a two-layer layout:
|
|
33
|
+
- `innertext` is a regular Python package with a runtime `__init__.py`
|
|
34
|
+
- the compiled Rust extension is loaded as `innertext._innertext`
|
|
35
|
+
|
|
36
|
+
This avoids namespace-package import issues and ensures `import innertext`
|
|
37
|
+
always exposes `inner_text`, `outer_text`, and `text_content`.
|
|
38
|
+
|
|
39
|
+
## Type Hints
|
|
40
|
+
|
|
41
|
+
This package ships with PEP 561-compatible typing metadata:
|
|
42
|
+
- `innertext/__init__.pyi` defines the public API types
|
|
43
|
+
- `innertext/py.typed` marks the package as typed
|
|
44
|
+
|
|
45
|
+
Type checkers such as mypy and pyright can therefore infer:
|
|
46
|
+
- `inner_text(html: str) -> str`
|
|
47
|
+
- `outer_text(html: str) -> str`
|
|
48
|
+
- `text_content(html: str) -> str`
|
|
49
|
+
|
|
30
50
|
## API
|
|
31
51
|
|
|
32
52
|
### Functions
|
|
@@ -29,7 +29,7 @@ fn text_content(html: &str) -> Result<String, PyErr> {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
#[pymodule]
|
|
32
|
-
fn
|
|
32
|
+
fn _innertext(m: &Bound<'_, PyModule>) -> PyResult<()> {
|
|
33
33
|
m.add_function(wrap_pyfunction!(inner_text, m)?)?;
|
|
34
34
|
m.add_function(wrap_pyfunction!(outer_text, m)?)?;
|
|
35
35
|
m.add_function(wrap_pyfunction!(text_content, m)?)?;
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "innertext"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.3"
|
|
8
8
|
description = "Pure Rust WHATWG-compliant innerText, outerText, and textContent extraction"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -38,5 +38,6 @@ Homepage = "https://github.com/joshfayer/innertext"
|
|
|
38
38
|
|
|
39
39
|
[tool.maturin]
|
|
40
40
|
features = ["pyo3/extension-module", "pyo3/abi3-py37"]
|
|
41
|
+
module-name = "innertext._innertext"
|
|
41
42
|
manifest-path = "bindings/innertext-python/Cargo.toml"
|
|
42
43
|
python-source = "python"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""innertext - Pure Rust WHATWG-compliant text extraction from HTML.
|
|
2
|
+
|
|
3
|
+
This package re-exports functions from the compiled Rust extension.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from ._innertext import inner_text, outer_text, text_content
|
|
7
|
+
|
|
8
|
+
__all__ = ["inner_text", "outer_text", "text_content"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|