unichef 0.1.0a2__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.
- unichef-0.1.0a2/.gitignore +40 -0
- unichef-0.1.0a2/PKG-INFO +48 -0
- unichef-0.1.0a2/README.md +18 -0
- unichef-0.1.0a2/pyproject.toml +100 -0
- unichef-0.1.0a2/src/unichef/__init__.py +4 -0
- unichef-0.1.0a2/src/unichef/__main__.py +31 -0
- unichef-0.1.0a2/src/unichef/_data/cyberchef-map.json +659 -0
- unichef-0.1.0a2/src/unichef/_data/html-entities.json.gz +0 -0
- unichef-0.1.0a2/src/unichef/_data/ucd-core-18.0.0.json.gz +0 -0
- unichef-0.1.0a2/src/unichef/_data/ucd-names-18.0.0.json.gz +0 -0
- unichef-0.1.0a2/src/unichef/_data/ucd-security-18.0.0.json.gz +0 -0
- unichef-0.1.0a2/src/unichef/cli/__init__.py +2 -0
- unichef-0.1.0a2/src/unichef/cli/about.py +24 -0
- unichef-0.1.0a2/src/unichef/cli/commands/__init__.py +6 -0
- unichef-0.1.0a2/src/unichef/cli/commands/characters.py +322 -0
- unichef-0.1.0a2/src/unichef/cli/commands/security.py +168 -0
- unichef-0.1.0a2/src/unichef/cli/commands/transform.py +471 -0
- unichef-0.1.0a2/src/unichef/cli/commands/utilities.py +102 -0
- unichef-0.1.0a2/src/unichef/cli/completion.py +250 -0
- unichef-0.1.0a2/src/unichef/cli/cyberchef.py +330 -0
- unichef-0.1.0a2/src/unichef/cli/envelope.py +73 -0
- unichef-0.1.0a2/src/unichef/cli/help_tree.py +211 -0
- unichef-0.1.0a2/src/unichef/cli/main.py +164 -0
- unichef-0.1.0a2/src/unichef/cli/manpage.py +124 -0
- unichef-0.1.0a2/src/unichef/cli/palette.py +53 -0
- unichef-0.1.0a2/src/unichef/cli/parser.py +201 -0
- unichef-0.1.0a2/src/unichef/cli/session.py +389 -0
- unichef-0.1.0a2/src/unichef/core/__init__.py +2 -0
- unichef-0.1.0a2/src/unichef/core/dish.py +351 -0
- unichef-0.1.0a2/src/unichef/core/errors.py +110 -0
- unichef-0.1.0a2/src/unichef/core/ops/__init__.py +25 -0
- unichef-0.1.0a2/src/unichef/core/ops/codecs.py +299 -0
- unichef-0.1.0a2/src/unichef/core/ops/compression.py +255 -0
- unichef-0.1.0a2/src/unichef/core/ops/crypto.py +403 -0
- unichef-0.1.0a2/src/unichef/core/ops/data.py +400 -0
- unichef-0.1.0a2/src/unichef/core/ops/encoding.py +640 -0
- unichef-0.1.0a2/src/unichef/core/ops/flow.py +194 -0
- unichef-0.1.0a2/src/unichef/core/ops/hashing.py +238 -0
- unichef-0.1.0a2/src/unichef/core/ops/html.py +162 -0
- unichef-0.1.0a2/src/unichef/core/ops/idna.py +112 -0
- unichef-0.1.0a2/src/unichef/core/ops/jwt.py +399 -0
- unichef-0.1.0a2/src/unichef/core/ops/security.py +184 -0
- unichef-0.1.0a2/src/unichef/core/ops/text.py +336 -0
- unichef-0.1.0a2/src/unichef/core/ops/unicode.py +717 -0
- unichef-0.1.0a2/src/unichef/core/recipe.py +266 -0
- unichef-0.1.0a2/src/unichef/core/registry.py +347 -0
- unichef-0.1.0a2/src/unichef/core/runner.py +205 -0
- unichef-0.1.0a2/src/unichef/py.typed +0 -0
- unichef-0.1.0a2/src/unichef/regex/__init__.py +2 -0
- unichef-0.1.0a2/src/unichef/regex/profile.py +502 -0
- unichef-0.1.0a2/src/unichef/regex/run.py +189 -0
- unichef-0.1.0a2/src/unichef/regex/translate.py +132 -0
- unichef-0.1.0a2/src/unichef/unicode/__init__.py +2 -0
- unichef-0.1.0a2/src/unichef/unicode/case.py +175 -0
- unichef-0.1.0a2/src/unichef/unicode/confusables.py +84 -0
- unichef-0.1.0a2/src/unichef/unicode/data.py +145 -0
- unichef-0.1.0a2/src/unichef/unicode/idna.py +362 -0
- unichef-0.1.0a2/src/unichef/unicode/names.py +198 -0
- unichef-0.1.0a2/src/unichef/unicode/normalize.py +169 -0
- unichef-0.1.0a2/src/unichef/unicode/props.py +166 -0
- unichef-0.1.0a2/src/unichef/unicode/query.py +261 -0
- unichef-0.1.0a2/src/unichef/unicode/segment.py +91 -0
- unichef-0.1.0a2/src/unichef/unicode/utf8.py +90 -0
- unichef-0.1.0a2/src/unichef/unicode/version.py +4 -0
- unichef-0.1.0a2/tests/cli/test_cli_characters.py +153 -0
- unichef-0.1.0a2/tests/cli/test_cli_cyberchef.py +208 -0
- unichef-0.1.0a2/tests/cli/test_cli_security_utilities.py +139 -0
- unichef-0.1.0a2/tests/cli/test_cli_shell.py +202 -0
- unichef-0.1.0a2/tests/cli/test_cli_transform.py +336 -0
- unichef-0.1.0a2/tests/conformance/test_graphemes.py +52 -0
- unichef-0.1.0a2/tests/conformance/test_idna.py +71 -0
- unichef-0.1.0a2/tests/conformance/test_normalization.py +75 -0
- unichef-0.1.0a2/tests/conftest.py +136 -0
- unichef-0.1.0a2/tests/parity/test_vectors.py +81 -0
- unichef-0.1.0a2/tests/perf/test_budgets.py +61 -0
- unichef-0.1.0a2/tests/unit/test_compression.py +47 -0
- unichef-0.1.0a2/tests/unit/test_dish.py +163 -0
- unichef-0.1.0a2/tests/unit/test_examples.py +36 -0
- unichef-0.1.0a2/tests/unit/test_punycode.py +49 -0
- unichef-0.1.0a2/tests/unit/test_query.py +121 -0
- unichef-0.1.0a2/tests/unit/test_regex.py +244 -0
- unichef-0.1.0a2/tests/unit/test_runner.py +294 -0
- unichef-0.1.0a2/tests/unit/test_unicode.py +330 -0
- unichef-0.1.0a2/tests/unit/test_utf8.py +56 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Planning documents: kept local, never committed
|
|
2
|
+
/PRD.md
|
|
3
|
+
/PROMPT.md
|
|
4
|
+
/UniChef-PRD.md
|
|
5
|
+
|
|
6
|
+
# Python
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
.venv/
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
htmlcov/
|
|
15
|
+
dist/
|
|
16
|
+
dist-extension/
|
|
17
|
+
build/
|
|
18
|
+
# The extension build scripts are source.
|
|
19
|
+
!clients/extensions/common/build/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
|
|
22
|
+
# Node / TypeScript
|
|
23
|
+
node_modules/
|
|
24
|
+
.pnpm-store/
|
|
25
|
+
*.tsbuildinfo
|
|
26
|
+
coverage/
|
|
27
|
+
|
|
28
|
+
# Generated assets (rebuilt by scripts/assets/build.py)
|
|
29
|
+
assets/branding/dist/
|
|
30
|
+
|
|
31
|
+
# Editors, OS, local tool state
|
|
32
|
+
.vscode/
|
|
33
|
+
.idea/
|
|
34
|
+
.DS_Store
|
|
35
|
+
Thumbs.db
|
|
36
|
+
.claude/settings.local.json
|
|
37
|
+
reports/
|
|
38
|
+
.claude/worktrees/
|
|
39
|
+
test-results/
|
|
40
|
+
playwright-report/
|
unichef-0.1.0a2/PKG-INFO
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: unichef
|
|
3
|
+
Version: 0.1.0a2
|
|
4
|
+
Summary: Unicode character analysis and deterministic data-transformation recipes for the terminal.
|
|
5
|
+
Project-URL: Homepage, https://0xdolan.github.io/unichef/
|
|
6
|
+
Project-URL: Source, https://github.com/0xdolan/unichef
|
|
7
|
+
Project-URL: Issues, https://github.com/0xdolan/unichef/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/0xdolan/unichef/blob/main/CHANGELOG.md
|
|
9
|
+
Author: 0xdolan
|
|
10
|
+
License: GPL-3.0-or-later
|
|
11
|
+
Keywords: bidi,cli,cyberchef,encoding,homoglyph,security,unicode
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Security
|
|
23
|
+
Classifier: Topic :: Text Processing
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.12
|
|
26
|
+
Requires-Dist: cryptography>=41.0
|
|
27
|
+
Requires-Dist: regex>=2022.10.31
|
|
28
|
+
Requires-Dist: rich>=13.7
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# unichef (Python)
|
|
32
|
+
|
|
33
|
+
The UniChef command-line tool and its Python core: Unicode character analysis and deterministic data-transformation recipes for the terminal.
|
|
34
|
+
|
|
35
|
+
UniChef computes every Unicode result from its own copy of the Unicode Character Database, so the output does not depend on the Python version that runs it.
|
|
36
|
+
|
|
37
|
+
## Development
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
uv sync --all-groups
|
|
41
|
+
uv run pytest
|
|
42
|
+
uv run ruff check . && uv run ruff format --check .
|
|
43
|
+
uv run mypy
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
See the repository [README](https://github.com/0xdolan/unichef#readme) for the full documentation.
|
|
47
|
+
|
|
48
|
+
License: GPL-3.0-or-later.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# unichef (Python)
|
|
2
|
+
|
|
3
|
+
The UniChef command-line tool and its Python core: Unicode character analysis and deterministic data-transformation recipes for the terminal.
|
|
4
|
+
|
|
5
|
+
UniChef computes every Unicode result from its own copy of the Unicode Character Database, so the output does not depend on the Python version that runs it.
|
|
6
|
+
|
|
7
|
+
## Development
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
uv sync --all-groups
|
|
11
|
+
uv run pytest
|
|
12
|
+
uv run ruff check . && uv run ruff format --check .
|
|
13
|
+
uv run mypy
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
See the repository [README](https://github.com/0xdolan/unichef#readme) for the full documentation.
|
|
17
|
+
|
|
18
|
+
License: GPL-3.0-or-later.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.21"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "unichef"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Unicode character analysis and deterministic data-transformation recipes for the terminal."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = { text = "GPL-3.0-or-later" }
|
|
12
|
+
authors = [{ name = "0xdolan" }]
|
|
13
|
+
keywords = ["unicode", "cyberchef", "encoding", "security", "cli", "homoglyph", "bidi"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"Intended Audience :: Information Technology",
|
|
19
|
+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Programming Language :: Python :: 3.14",
|
|
25
|
+
"Topic :: Security",
|
|
26
|
+
"Topic :: Text Processing",
|
|
27
|
+
"Typing :: Typed",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"rich>=13.7",
|
|
31
|
+
"regex>=2022.10.31",
|
|
32
|
+
"cryptography>=41.0",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://0xdolan.github.io/unichef/"
|
|
37
|
+
Source = "https://github.com/0xdolan/unichef"
|
|
38
|
+
Issues = "https://github.com/0xdolan/unichef/issues"
|
|
39
|
+
Changelog = "https://github.com/0xdolan/unichef/blob/main/CHANGELOG.md"
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
unichef = "unichef.__main__:main"
|
|
43
|
+
|
|
44
|
+
[dependency-groups]
|
|
45
|
+
dev = [
|
|
46
|
+
"pytest>=8.3",
|
|
47
|
+
"pytest-cov>=5.0",
|
|
48
|
+
"hypothesis>=6.100",
|
|
49
|
+
"mypy>=1.13",
|
|
50
|
+
"ruff>=0.8",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.hatch.version]
|
|
54
|
+
path = "src/unichef/__init__.py"
|
|
55
|
+
|
|
56
|
+
[tool.hatch.build.targets.wheel]
|
|
57
|
+
packages = ["src/unichef"]
|
|
58
|
+
|
|
59
|
+
[tool.hatch.build.targets.sdist]
|
|
60
|
+
include = ["src/unichef", "tests", "README.md", "pyproject.toml"]
|
|
61
|
+
|
|
62
|
+
[tool.ruff]
|
|
63
|
+
line-length = 100
|
|
64
|
+
target-version = "py312"
|
|
65
|
+
src = ["src", "tests"]
|
|
66
|
+
|
|
67
|
+
[tool.ruff.lint]
|
|
68
|
+
select = ["E", "W", "F", "I", "N", "UP", "B", "A", "C4", "SIM", "PTH", "RET", "ARG", "PL", "PERF", "RUF", "S", "T20", "ANN"]
|
|
69
|
+
ignore = ["PLR0913", "S101"]
|
|
70
|
+
|
|
71
|
+
[tool.ruff.lint.per-file-ignores]
|
|
72
|
+
"tests/**" = ["ANN", "PLR2004", "RUF001", "S"]
|
|
73
|
+
|
|
74
|
+
[tool.ruff.lint.isort]
|
|
75
|
+
known-first-party = ["unichef"]
|
|
76
|
+
|
|
77
|
+
[tool.ruff.format]
|
|
78
|
+
quote-style = "double"
|
|
79
|
+
docstring-code-format = true
|
|
80
|
+
|
|
81
|
+
[tool.mypy]
|
|
82
|
+
strict = true
|
|
83
|
+
python_version = "3.12"
|
|
84
|
+
files = ["src", "tests"]
|
|
85
|
+
warn_unreachable = true
|
|
86
|
+
|
|
87
|
+
[[tool.mypy.overrides]]
|
|
88
|
+
module = ["regex.*"]
|
|
89
|
+
ignore_missing_imports = true
|
|
90
|
+
|
|
91
|
+
[tool.pytest.ini_options]
|
|
92
|
+
# Performance budgets run on their own (`make perf`): coverage tracing would skew them.
|
|
93
|
+
addopts = "-ra --strict-markers -m 'not perf' --cov=unichef --cov-report=term-missing --cov-fail-under=90"
|
|
94
|
+
testpaths = ["tests"]
|
|
95
|
+
markers = [
|
|
96
|
+
"parity: shared vector tests",
|
|
97
|
+
"conformance: UCD conformance tests",
|
|
98
|
+
"slow: long-running",
|
|
99
|
+
"perf: performance budgets (PRD §13.1), run by make perf",
|
|
100
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
"""``python -m unichef`` and the ``unichef`` console script."""
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from collections.abc import Sequence
|
|
6
|
+
|
|
7
|
+
_PLAIN_VERSION = (["version"], ["--version"])
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def fast_version(argv: Sequence[str]) -> bool:
|
|
11
|
+
"""Answer a bare ``unichef version`` without loading Rich or the registry (PRD §5.8:
|
|
12
|
+
cold start). Any other flag takes the normal path."""
|
|
13
|
+
if list(argv) not in _PLAIN_VERSION:
|
|
14
|
+
return False
|
|
15
|
+
from unichef.cli.about import version_line # noqa: PLC0415
|
|
16
|
+
|
|
17
|
+
sys.stdout.buffer.write((version_line() + "\n").encode("utf-8"))
|
|
18
|
+
sys.stdout.flush()
|
|
19
|
+
return True
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main() -> int:
|
|
23
|
+
if fast_version(sys.argv[1:]):
|
|
24
|
+
return 0
|
|
25
|
+
from unichef.cli.main import run # noqa: PLC0415 - keep ``import unichef`` cheap
|
|
26
|
+
|
|
27
|
+
return run()
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
if __name__ == "__main__":
|
|
31
|
+
sys.exit(main())
|