metadata-utils 0.2.1__tar.gz → 1.0.0__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.
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/CHANGES.txt +7 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/MANIFEST.in +0 -1
- metadata_utils-1.0.0/PKG-INFO +69 -0
- metadata_utils-1.0.0/README.md +40 -0
- metadata_utils-1.0.0/pyproject.toml +10 -0
- metadata_utils-1.0.0/setup.cfg +74 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils/__init__.py +8 -3
- metadata_utils-1.0.0/src/metadata_utils.egg-info/PKG-INFO +69 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/SOURCES.txt +0 -2
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/tests/test_core.py +16 -7
- metadata_utils-0.2.1/PKG-INFO +0 -37
- metadata_utils-0.2.1/README.md +0 -13
- metadata_utils-0.2.1/pyproject.toml +0 -3
- metadata_utils-0.2.1/setup.cfg +0 -14
- metadata_utils-0.2.1/setup.py +0 -63
- metadata_utils-0.2.1/src/metadata_utils.egg-info/PKG-INFO +0 -37
- metadata_utils-0.2.1/tox.ini +0 -12
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/LICENSE +0 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils/py.typed +0 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/dependency_links.txt +0 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/not-zip-safe +0 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/requires.txt +1 -1
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/top_level.txt +0 -0
- {metadata_utils-0.2.1 → metadata_utils-1.0.0}/tests/__init__.py +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
1.0.0
|
|
2
|
+
* Add helper examples and test entity round trips and compatibility normalization.
|
|
3
|
+
* Consolidate packaging and tox configuration and add coverage reporting.
|
|
4
|
+
* Extend the test matrix through Python 3.15 while retaining Python 3.6+.
|
|
5
|
+
* Document the quoted HTML attribute context and tighten type annotations.
|
|
6
|
+
* Use the official Black pre-commit mirror.
|
|
7
|
+
|
|
1
8
|
0.2.1
|
|
2
9
|
* minor formatting
|
|
3
10
|
0.2.0
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: metadata_utils
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Lightweight Metadata Support
|
|
5
|
+
Home-page: https://github.com/jvanasco/metadata_utils
|
|
6
|
+
Author: Jonathan Vanasco
|
|
7
|
+
Author-email: jvanasco@2xlp.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: web
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: >=3.6
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Provides-Extra: testing
|
|
26
|
+
Requires-Dist: pytest; extra == "testing"
|
|
27
|
+
Requires-Dist: mypy; extra == "testing"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
metadata_utils
|
|
33
|
+
==============
|
|
34
|
+
|
|
35
|
+
This package offers lightweight tools for dealing with metadata in HTML.
|
|
36
|
+
|
|
37
|
+
## Quoted HTML attributes
|
|
38
|
+
|
|
39
|
+
Use `html_attribute_escape` on text before inserting it into a quoted HTML
|
|
40
|
+
attribute.
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from metadata_utils import html_attribute_escape, html_attribute_unescape
|
|
44
|
+
|
|
45
|
+
title = 'Fish & "Chips"'
|
|
46
|
+
escaped = html_attribute_escape(title)
|
|
47
|
+
assert f'<span title="{escaped}"></span>' == (
|
|
48
|
+
'<span title="Fish & "Chips""></span>'
|
|
49
|
+
)
|
|
50
|
+
assert html_attribute_unescape(escaped) == title
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`html_attribute_unescape` decodes one layer of the five named entities emitted
|
|
54
|
+
by the escape function (`&`, `<`, `>`, `"`, and `'`).
|
|
55
|
+
Other named and numeric references pass through unchanged.
|
|
56
|
+
|
|
57
|
+
## ASCII normalization
|
|
58
|
+
|
|
59
|
+
Both helpers apply Unicode normalization, drop any remaining non-ASCII
|
|
60
|
+
characters, and return `bytes`. Both expand the `fi` ligature into `fi`.
|
|
61
|
+
NFKD decomposes `é` so the ASCII `e` survives. NFKC keeps the composed
|
|
62
|
+
`é`, which is dropped during ASCII encoding.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from metadata_utils import force_clean_ascii_NFKC, force_clean_ascii_NFKD
|
|
66
|
+
|
|
67
|
+
assert force_clean_ascii_NFKD("fi café") == b"fi cafe"
|
|
68
|
+
assert force_clean_ascii_NFKC("fi café") == b"fi caf"
|
|
69
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
metadata_utils
|
|
4
|
+
==============
|
|
5
|
+
|
|
6
|
+
This package offers lightweight tools for dealing with metadata in HTML.
|
|
7
|
+
|
|
8
|
+
## Quoted HTML attributes
|
|
9
|
+
|
|
10
|
+
Use `html_attribute_escape` on text before inserting it into a quoted HTML
|
|
11
|
+
attribute.
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from metadata_utils import html_attribute_escape, html_attribute_unescape
|
|
15
|
+
|
|
16
|
+
title = 'Fish & "Chips"'
|
|
17
|
+
escaped = html_attribute_escape(title)
|
|
18
|
+
assert f'<span title="{escaped}"></span>' == (
|
|
19
|
+
'<span title="Fish & "Chips""></span>'
|
|
20
|
+
)
|
|
21
|
+
assert html_attribute_unescape(escaped) == title
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`html_attribute_unescape` decodes one layer of the five named entities emitted
|
|
25
|
+
by the escape function (`&`, `<`, `>`, `"`, and `'`).
|
|
26
|
+
Other named and numeric references pass through unchanged.
|
|
27
|
+
|
|
28
|
+
## ASCII normalization
|
|
29
|
+
|
|
30
|
+
Both helpers apply Unicode normalization, drop any remaining non-ASCII
|
|
31
|
+
characters, and return `bytes`. Both expand the `fi` ligature into `fi`.
|
|
32
|
+
NFKD decomposes `é` so the ASCII `e` survives. NFKC keeps the composed
|
|
33
|
+
`é`, which is dropped during ASCII encoding.
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from metadata_utils import force_clean_ascii_NFKC, force_clean_ascii_NFKD
|
|
37
|
+
|
|
38
|
+
assert force_clean_ascii_NFKD("fi café") == b"fi cafe"
|
|
39
|
+
assert force_clean_ascii_NFKC("fi café") == b"fi caf"
|
|
40
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61; python_version >= '3.7'", "setuptools>=59.6,<60; python_version < '3.7'", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.black]
|
|
6
|
+
target-version = ['py36']
|
|
7
|
+
|
|
8
|
+
[tool.mypy]
|
|
9
|
+
disallow_untyped_defs = true
|
|
10
|
+
disallow_any_generics = true
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = metadata_utils
|
|
3
|
+
version = attr: metadata_utils.__VERSION__
|
|
4
|
+
description = Lightweight Metadata Support
|
|
5
|
+
long_description = file: README.md
|
|
6
|
+
long_description_content_type = text/markdown
|
|
7
|
+
url = https://github.com/jvanasco/metadata_utils
|
|
8
|
+
author = Jonathan Vanasco
|
|
9
|
+
author_email = jvanasco@2xlp.com
|
|
10
|
+
keywords = web
|
|
11
|
+
license = MIT
|
|
12
|
+
license_file = LICENSE
|
|
13
|
+
classifiers =
|
|
14
|
+
Intended Audience :: Developers
|
|
15
|
+
Programming Language :: Python :: 3
|
|
16
|
+
Programming Language :: Python :: 3.6
|
|
17
|
+
Programming Language :: Python :: 3.7
|
|
18
|
+
Programming Language :: Python :: 3.8
|
|
19
|
+
Programming Language :: Python :: 3.9
|
|
20
|
+
Programming Language :: Python :: 3.10
|
|
21
|
+
Programming Language :: Python :: 3.11
|
|
22
|
+
Programming Language :: Python :: 3.12
|
|
23
|
+
Programming Language :: Python :: 3.13
|
|
24
|
+
Programming Language :: Python :: 3.14
|
|
25
|
+
Programming Language :: Python :: 3.15
|
|
26
|
+
|
|
27
|
+
[options]
|
|
28
|
+
python_requires = >=3.6
|
|
29
|
+
package_dir =
|
|
30
|
+
= src
|
|
31
|
+
packages = find:
|
|
32
|
+
include_package_data = true
|
|
33
|
+
zip_safe = false
|
|
34
|
+
|
|
35
|
+
[options.packages.find]
|
|
36
|
+
where = src
|
|
37
|
+
|
|
38
|
+
[options.package_data]
|
|
39
|
+
metadata_utils = py.typed
|
|
40
|
+
|
|
41
|
+
[options.extras_require]
|
|
42
|
+
testing =
|
|
43
|
+
pytest
|
|
44
|
+
mypy
|
|
45
|
+
|
|
46
|
+
[flake8]
|
|
47
|
+
exclude = .eggs/*, .pytest_cache/*, .tox/*, build/*, dist/*
|
|
48
|
+
application_import_names = metadata_utils
|
|
49
|
+
import_order_style = appnexus
|
|
50
|
+
|
|
51
|
+
[tox:tox]
|
|
52
|
+
envlist = py36, py37, py38, py39, py310, py311, py312, py313, py314, py315, mypy
|
|
53
|
+
isolated_build = true
|
|
54
|
+
|
|
55
|
+
[testenv]
|
|
56
|
+
package = wheel
|
|
57
|
+
deps =
|
|
58
|
+
pytest
|
|
59
|
+
coverage
|
|
60
|
+
setenv =
|
|
61
|
+
COVERAGE_FILE = {envtmpdir}{/}.coverage
|
|
62
|
+
commands =
|
|
63
|
+
python -m coverage run --source=metadata_utils -m pytest {posargs}
|
|
64
|
+
python -m coverage html -d htmlcov/{envname}
|
|
65
|
+
|
|
66
|
+
[testenv:mypy]
|
|
67
|
+
basepython = python3.14
|
|
68
|
+
deps = mypy
|
|
69
|
+
commands = python -m mypy src tests
|
|
70
|
+
|
|
71
|
+
[egg_info]
|
|
72
|
+
tag_build =
|
|
73
|
+
tag_date = 0
|
|
74
|
+
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# stdlib
|
|
2
2
|
import unicodedata
|
|
3
|
+
from typing import Dict
|
|
3
4
|
from xml.sax.saxutils import escape
|
|
4
5
|
from xml.sax.saxutils import unescape
|
|
5
6
|
|
|
6
|
-
__VERSION__ = "0.
|
|
7
|
+
__VERSION__ = "1.0.0"
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
# ==============================================================================
|
|
@@ -12,23 +13,27 @@ __VERSION__ = "0.2.1"
|
|
|
12
13
|
# https://wiki.python.org/moin/EscapingHtml
|
|
13
14
|
# escape() and unescape() takes care of "&" , "<" and ">"
|
|
14
15
|
# we need to handle quotes, so we don't break things
|
|
15
|
-
html_attribute_escape_table:
|
|
16
|
-
html_attribute_unescape_table:
|
|
16
|
+
html_attribute_escape_table: Dict[str, str] = {'"': """, "'": "'"}
|
|
17
|
+
html_attribute_unescape_table: Dict[str, str] = {
|
|
17
18
|
v: k for (k, v) in html_attribute_escape_table.items()
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
def html_attribute_escape(text: str) -> str:
|
|
23
|
+
"""Escape text for insertion into a quoted HTML attribute."""
|
|
22
24
|
return escape(text, html_attribute_escape_table)
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
def html_attribute_unescape(text: str) -> str:
|
|
28
|
+
"""Decode the five named entities emitted by html_attribute_escape."""
|
|
26
29
|
return unescape(text, html_attribute_unescape_table)
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
def force_clean_ascii_NFKD(text: str) -> bytes:
|
|
33
|
+
"""Apply NFKD, then return ASCII bytes, dropping non-ASCII characters."""
|
|
30
34
|
return unicodedata.normalize("NFKD", text).encode("ascii", "ignore")
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
def force_clean_ascii_NFKC(text: str) -> bytes:
|
|
38
|
+
"""Apply NFKC, then return ASCII bytes, dropping non-ASCII characters."""
|
|
34
39
|
return unicodedata.normalize("NFKC", text).encode("ascii", "ignore")
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: metadata_utils
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Lightweight Metadata Support
|
|
5
|
+
Home-page: https://github.com/jvanasco/metadata_utils
|
|
6
|
+
Author: Jonathan Vanasco
|
|
7
|
+
Author-email: jvanasco@2xlp.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: web
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: >=3.6
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Provides-Extra: testing
|
|
26
|
+
Requires-Dist: pytest; extra == "testing"
|
|
27
|
+
Requires-Dist: mypy; extra == "testing"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
metadata_utils
|
|
33
|
+
==============
|
|
34
|
+
|
|
35
|
+
This package offers lightweight tools for dealing with metadata in HTML.
|
|
36
|
+
|
|
37
|
+
## Quoted HTML attributes
|
|
38
|
+
|
|
39
|
+
Use `html_attribute_escape` on text before inserting it into a quoted HTML
|
|
40
|
+
attribute.
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from metadata_utils import html_attribute_escape, html_attribute_unescape
|
|
44
|
+
|
|
45
|
+
title = 'Fish & "Chips"'
|
|
46
|
+
escaped = html_attribute_escape(title)
|
|
47
|
+
assert f'<span title="{escaped}"></span>' == (
|
|
48
|
+
'<span title="Fish & "Chips""></span>'
|
|
49
|
+
)
|
|
50
|
+
assert html_attribute_unescape(escaped) == title
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`html_attribute_unescape` decodes one layer of the five named entities emitted
|
|
54
|
+
by the escape function (`&`, `<`, `>`, `"`, and `'`).
|
|
55
|
+
Other named and numeric references pass through unchanged.
|
|
56
|
+
|
|
57
|
+
## ASCII normalization
|
|
58
|
+
|
|
59
|
+
Both helpers apply Unicode normalization, drop any remaining non-ASCII
|
|
60
|
+
characters, and return `bytes`. Both expand the `fi` ligature into `fi`.
|
|
61
|
+
NFKD decomposes `é` so the ASCII `e` survives. NFKC keeps the composed
|
|
62
|
+
`é`, which is dropped during ASCII encoding.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from metadata_utils import force_clean_ascii_NFKC, force_clean_ascii_NFKD
|
|
66
|
+
|
|
67
|
+
assert force_clean_ascii_NFKD("fi café") == b"fi cafe"
|
|
68
|
+
assert force_clean_ascii_NFKC("fi café") == b"fi caf"
|
|
69
|
+
```
|
|
@@ -4,7 +4,6 @@ import unittest
|
|
|
4
4
|
# local
|
|
5
5
|
import metadata_utils
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
# ==============================================================================
|
|
9
8
|
|
|
10
9
|
|
|
@@ -13,37 +12,47 @@ class TestEscaping(unittest.TestCase):
|
|
|
13
12
|
text_escaped = "foo "' bar"
|
|
14
13
|
text_escaped_twice = "foo &quot;&apos; bar"
|
|
15
14
|
|
|
16
|
-
def test_escape(self):
|
|
15
|
+
def test_escape(self) -> None:
|
|
17
16
|
escaped = metadata_utils.html_attribute_escape(self.text_raw)
|
|
18
17
|
self.assertEqual(escaped, self.text_escaped)
|
|
19
18
|
|
|
20
|
-
def test_escape_twice(self):
|
|
19
|
+
def test_escape_twice(self) -> None:
|
|
21
20
|
# we don't parse we, just escape, so this will change
|
|
22
21
|
escaped_twice = metadata_utils.html_attribute_escape(self.text_escaped)
|
|
23
22
|
self.assertEqual(escaped_twice, self.text_escaped_twice)
|
|
24
23
|
|
|
25
|
-
def test_unescape(self):
|
|
24
|
+
def test_unescape(self) -> None:
|
|
26
25
|
unescaped = metadata_utils.html_attribute_unescape(self.text_escaped)
|
|
27
26
|
self.assertEqual(unescaped, self.text_raw)
|
|
28
27
|
|
|
29
|
-
def test_roundtrip(self):
|
|
28
|
+
def test_roundtrip(self) -> None:
|
|
30
29
|
escaped = metadata_utils.html_attribute_escape(self.text_raw)
|
|
31
30
|
self.assertEqual(escaped, self.text_escaped)
|
|
32
31
|
unescaped = metadata_utils.html_attribute_unescape(escaped)
|
|
33
32
|
self.assertEqual(unescaped, self.text_raw)
|
|
34
33
|
|
|
34
|
+
def test_roundtrip_preserves_literal_entity(self) -> None:
|
|
35
|
+
escaped = metadata_utils.html_attribute_escape(""")
|
|
36
|
+
self.assertEqual(escaped, "&quot;")
|
|
37
|
+
self.assertEqual(metadata_utils.html_attribute_unescape(escaped), """)
|
|
38
|
+
|
|
35
39
|
|
|
36
40
|
class TestCleanAscii(unittest.TestCase):
|
|
37
|
-
def test_NFKD(self):
|
|
41
|
+
def test_NFKD(self) -> None:
|
|
38
42
|
text_unicode = "El Ni\xf1o"
|
|
39
43
|
text_clean_a = "El Nino" # downgrades
|
|
40
44
|
escaped = metadata_utils.force_clean_ascii_NFKD(text_unicode)
|
|
41
45
|
# py3 is a bytes
|
|
42
46
|
self.assertEqual(escaped, text_clean_a.encode())
|
|
43
47
|
|
|
44
|
-
def test_NFKC(self):
|
|
48
|
+
def test_NFKC(self) -> None:
|
|
45
49
|
text_unicode = "El Ni\xf1o"
|
|
46
50
|
text_clean_a = "El Nio" # strips
|
|
47
51
|
escaped = metadata_utils.force_clean_ascii_NFKC(text_unicode)
|
|
48
52
|
# py3 is a bytes
|
|
49
53
|
self.assertEqual(escaped, text_clean_a.encode())
|
|
54
|
+
|
|
55
|
+
def test_compatibility_ligature(self) -> None:
|
|
56
|
+
text = "\ufb01 caf\xe9"
|
|
57
|
+
self.assertEqual(metadata_utils.force_clean_ascii_NFKD(text), b"fi cafe")
|
|
58
|
+
self.assertEqual(metadata_utils.force_clean_ascii_NFKC(text), b"fi caf")
|
metadata_utils-0.2.1/PKG-INFO
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: metadata_utils
|
|
3
|
-
Version: 0.2.1
|
|
4
|
-
Summary: Lightweight Metadata Support
|
|
5
|
-
Home-page: https://github.com/jvanasco/metadata_utils
|
|
6
|
-
Author: Jonathan Vanasco
|
|
7
|
-
Author-email: jonathan@findmeon.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: web
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
-
Requires-Python: >=3.6
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
Provides-Extra: testing
|
|
23
|
-
License-File: LICENSE
|
|
24
|
-
|
|
25
|
-

|
|
26
|
-
|
|
27
|
-
metadata_utils
|
|
28
|
-
==============
|
|
29
|
-
|
|
30
|
-
This package offers lightweight tools for dealing with metadata in HTML.
|
|
31
|
-
|
|
32
|
-
The following functions are made available to streamline dealing with html encodings:
|
|
33
|
-
|
|
34
|
-
* `html_attribute_escape`
|
|
35
|
-
* `html_attribute_unescape`
|
|
36
|
-
* `force_clean_ascii_NFKD`
|
|
37
|
-
* `force_clean_ascii_NFKC`
|
metadata_utils-0.2.1/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
metadata_utils
|
|
4
|
-
==============
|
|
5
|
-
|
|
6
|
-
This package offers lightweight tools for dealing with metadata in HTML.
|
|
7
|
-
|
|
8
|
-
The following functions are made available to streamline dealing with html encodings:
|
|
9
|
-
|
|
10
|
-
* `html_attribute_escape`
|
|
11
|
-
* `html_attribute_unescape`
|
|
12
|
-
* `force_clean_ascii_NFKD`
|
|
13
|
-
* `force_clean_ascii_NFKC`
|
metadata_utils-0.2.1/setup.cfg
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[easy_install]
|
|
2
|
-
zip_ok = false
|
|
3
|
-
|
|
4
|
-
[flake8]
|
|
5
|
-
per-file-ignores =
|
|
6
|
-
setup.py: E501
|
|
7
|
-
exclude = .eggs/*, .pytest_cache/*, .tox/*, build/*, dist/*
|
|
8
|
-
application_import_names = metadata_utils
|
|
9
|
-
import_order_style = appnexus
|
|
10
|
-
|
|
11
|
-
[egg_info]
|
|
12
|
-
tag_build =
|
|
13
|
-
tag_date = 0
|
|
14
|
-
|
metadata_utils-0.2.1/setup.py
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"""metadata_utils installation script.
|
|
2
|
-
"""
|
|
3
|
-
import os
|
|
4
|
-
import re
|
|
5
|
-
|
|
6
|
-
from setuptools import find_packages
|
|
7
|
-
from setuptools import setup
|
|
8
|
-
|
|
9
|
-
HERE = os.path.abspath(os.path.dirname(__file__))
|
|
10
|
-
|
|
11
|
-
long_description = description = "Lightweight Metadata Support"
|
|
12
|
-
with open(os.path.join(HERE, "README.md")) as fp:
|
|
13
|
-
long_description = fp.read()
|
|
14
|
-
|
|
15
|
-
# store version in the init.py
|
|
16
|
-
with open(os.path.join(HERE, "src", "metadata_utils", "__init__.py")) as v_file:
|
|
17
|
-
VERSION = re.compile(r'.*__VERSION__ = "(.*?)"', re.S).match(v_file.read()).group(1)
|
|
18
|
-
|
|
19
|
-
requires = []
|
|
20
|
-
tests_require = [
|
|
21
|
-
"mypy",
|
|
22
|
-
"pytest",
|
|
23
|
-
]
|
|
24
|
-
testing_extras = tests_require + []
|
|
25
|
-
|
|
26
|
-
setup(
|
|
27
|
-
name="metadata_utils",
|
|
28
|
-
description="Lightweight Metadata Support",
|
|
29
|
-
long_description=long_description,
|
|
30
|
-
long_description_content_type="text/markdown",
|
|
31
|
-
version=VERSION,
|
|
32
|
-
url="https://github.com/jvanasco/metadata_utils",
|
|
33
|
-
author="Jonathan Vanasco",
|
|
34
|
-
author_email="jonathan@findmeon.com",
|
|
35
|
-
zip_safe=False,
|
|
36
|
-
python_requires=">=3.6",
|
|
37
|
-
keywords="web",
|
|
38
|
-
install_requires=requires,
|
|
39
|
-
tests_require=tests_require,
|
|
40
|
-
extras_require={
|
|
41
|
-
"testing": testing_extras,
|
|
42
|
-
},
|
|
43
|
-
test_suite="tests",
|
|
44
|
-
packages=find_packages(
|
|
45
|
-
where="src",
|
|
46
|
-
),
|
|
47
|
-
package_dir={"": "src"},
|
|
48
|
-
package_data={"metadata_utils": ["py.typed"]},
|
|
49
|
-
include_package_data=True,
|
|
50
|
-
classifiers=[
|
|
51
|
-
"Intended Audience :: Developers",
|
|
52
|
-
"Programming Language :: Python",
|
|
53
|
-
"Programming Language :: Python :: 3",
|
|
54
|
-
"Programming Language :: Python :: 3.6",
|
|
55
|
-
"Programming Language :: Python :: 3.7",
|
|
56
|
-
"Programming Language :: Python :: 3.8",
|
|
57
|
-
"Programming Language :: Python :: 3.9",
|
|
58
|
-
"Programming Language :: Python :: 3.10",
|
|
59
|
-
"Programming Language :: Python :: 3.11",
|
|
60
|
-
"License :: OSI Approved :: MIT License",
|
|
61
|
-
],
|
|
62
|
-
license="MIT",
|
|
63
|
-
)
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: metadata-utils
|
|
3
|
-
Version: 0.2.1
|
|
4
|
-
Summary: Lightweight Metadata Support
|
|
5
|
-
Home-page: https://github.com/jvanasco/metadata_utils
|
|
6
|
-
Author: Jonathan Vanasco
|
|
7
|
-
Author-email: jonathan@findmeon.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: web
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
-
Requires-Python: >=3.6
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
Provides-Extra: testing
|
|
23
|
-
License-File: LICENSE
|
|
24
|
-
|
|
25
|
-

|
|
26
|
-
|
|
27
|
-
metadata_utils
|
|
28
|
-
==============
|
|
29
|
-
|
|
30
|
-
This package offers lightweight tools for dealing with metadata in HTML.
|
|
31
|
-
|
|
32
|
-
The following functions are made available to streamline dealing with html encodings:
|
|
33
|
-
|
|
34
|
-
* `html_attribute_escape`
|
|
35
|
-
* `html_attribute_unescape`
|
|
36
|
-
* `force_clean_ascii_NFKD`
|
|
37
|
-
* `force_clean_ascii_NFKC`
|
metadata_utils-0.2.1/tox.ini
DELETED
|
File without changes
|
|
File without changes
|
{metadata_utils-0.2.1 → metadata_utils-1.0.0}/src/metadata_utils.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|