wenyi-cli 1.4.2__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.
@@ -0,0 +1,66 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ venv/
5
+ build/
6
+ dist/
7
+ /release-assets/
8
+ *.spec
9
+ state/
10
+ *.db
11
+ .DS_Store
12
+ *.zh.epub
13
+ *.zh.txt
14
+ *.txt
15
+ !packages/core/wenyi_core/i18n/data/tasks/*.txt
16
+ !packages/core/wenyi_core/i18n/data/shared/*.txt
17
+
18
+ # Input books and generated artifacts (do not commit)
19
+ output/
20
+ explore/
21
+ *.epub
22
+ *.fb2
23
+ *.mobi
24
+ *.azw3
25
+ *.pdf
26
+ *.html
27
+ !/apps/web/tests/select-harness.html
28
+ !/apps/desktop/frontend/tests/select-harness.html
29
+ *.srt
30
+ *.docx
31
+
32
+ # Root Cargo workspace build directory shared by both crates.
33
+ /target/
34
+
35
+ # Web workspace artifacts.
36
+ node_modules/
37
+ .next/
38
+ .turbo/
39
+ .env
40
+ .env.local
41
+ data/
42
+ *.zh-bi.epub
43
+
44
+ # pytest / coverage
45
+ .pytest_cache/
46
+ .ruff_cache/
47
+ .coverage
48
+ htmlcov/
49
+ # Pytest temporary roots. The fixed one comes from --basetemp in pyproject.toml;
50
+ # the named one is what tempfile falls back to when TMPDIR is unusable, and a
51
+ # leftover tree there changes what a repo-root scan collects between workers.
52
+ .pytest-tmp/
53
+ pytest-of-*/
54
+
55
+ # tiktoken byte cache; falls back to the working directory when TMPDIR is unusable.
56
+ data-gym-cache/
57
+
58
+ local_references
59
+ .scratch/
60
+
61
+ # Generated TypeScript build metadata and compiled tooling configuration.
62
+ *.tsbuildinfo
63
+ /apps/web/vite.config.js
64
+ /apps/web/vite.config.d.ts
65
+ /apps/web/playwright.config.js
66
+ /apps/web/playwright.config.d.ts
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.5
2
+ Name: wenyi-cli
3
+ Version: 1.4.2
4
+ Summary: Local command-line interface for Wenyi's translation engine.
5
+ Project-URL: Repository, https://github.com/BigDawnGhost/wenyi
6
+ Project-URL: Documentation, https://github.com/BigDawnGhost/wenyi/blob/main/docs/cli.md
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: rich>=13.7
9
+ Requires-Dist: typer>=0.12
10
+ Requires-Dist: wenyi-core
11
+ Description-Content-Type: text/markdown
12
+
13
+ # Wenyi CLI
14
+
15
+ Local command-line application for multilingual long-form translation, powered
16
+ by `wenyi-core`. It supports terminology management, contextual translation,
17
+ polishing, whole-book review, resumable workflows, and multiple document formats.
18
+
19
+ Install into an activated Python 3.10+ virtual environment:
20
+
21
+ ```bash
22
+ uv pip install wenyi-cli
23
+ wenyi --version
24
+ wenyi --help
25
+ ```
26
+
27
+ The executable is `wenyi`; the module entry point is `python -m wenyi_cli`.
28
+ The translation engine is installed automatically. API keys are read from
29
+ environment variables; do not put credentials in configuration files.
30
+
31
+ PDF layout preservation additionally requires an independently installed
32
+ `wenyi-babeldoc-bridge` HTTP service. This package does not install BabelDOC,
33
+ the Web API, or the Desktop application.
34
+
35
+ - [CLI guide](https://github.com/BigDawnGhost/wenyi/blob/main/docs/cli.md)
36
+ - [Configuration](https://github.com/BigDawnGhost/wenyi/blob/main/docs/configuration.md)
37
+ - [Source and license](https://github.com/BigDawnGhost/wenyi)
38
+ - [简体中文](https://github.com/BigDawnGhost/wenyi/blob/main/docs/zh/cli.md)
@@ -0,0 +1,26 @@
1
+ # Wenyi CLI
2
+
3
+ Local command-line application for multilingual long-form translation, powered
4
+ by `wenyi-core`. It supports terminology management, contextual translation,
5
+ polishing, whole-book review, resumable workflows, and multiple document formats.
6
+
7
+ Install into an activated Python 3.10+ virtual environment:
8
+
9
+ ```bash
10
+ uv pip install wenyi-cli
11
+ wenyi --version
12
+ wenyi --help
13
+ ```
14
+
15
+ The executable is `wenyi`; the module entry point is `python -m wenyi_cli`.
16
+ The translation engine is installed automatically. API keys are read from
17
+ environment variables; do not put credentials in configuration files.
18
+
19
+ PDF layout preservation additionally requires an independently installed
20
+ `wenyi-babeldoc-bridge` HTTP service. This package does not install BabelDOC,
21
+ the Web API, or the Desktop application.
22
+
23
+ - [CLI guide](https://github.com/BigDawnGhost/wenyi/blob/main/docs/cli.md)
24
+ - [Configuration](https://github.com/BigDawnGhost/wenyi/blob/main/docs/configuration.md)
25
+ - [Source and license](https://github.com/BigDawnGhost/wenyi)
26
+ - [简体中文](https://github.com/BigDawnGhost/wenyi/blob/main/docs/zh/cli.md)
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "wenyi-cli"
3
+ dynamic = ["version"]
4
+ description = "Local command-line interface for Wenyi's translation engine."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "wenyi-core",
9
+ "typer>=0.12",
10
+ "rich>=13.7",
11
+ ]
12
+
13
+ [project.urls]
14
+ Repository = "https://github.com/BigDawnGhost/wenyi"
15
+ Documentation = "https://github.com/BigDawnGhost/wenyi/blob/main/docs/cli.md"
16
+
17
+ [project.scripts]
18
+ wenyi = "wenyi_cli.main:main"
19
+
20
+ [tool.uv.sources]
21
+ wenyi-core = { workspace = true }
22
+
23
+ [build-system]
24
+ requires = ["hatchling", "hatch-vcs"]
25
+ build-backend = "hatchling.build"
26
+
27
+ [tool.hatch.version]
28
+ source = "vcs"
29
+
30
+ [tool.hatch.version.raw-options]
31
+ root = "../.."
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["wenyi_cli"]
@@ -0,0 +1,22 @@
1
+ """Shared pytest fixtures for CLI tests."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import pytest
6
+
7
+
8
+ @pytest.fixture(autouse=True)
9
+ def _plain_rich_console(monkeypatch: pytest.MonkeyPatch) -> None:
10
+ """Prefer colorless consoles in tests; Progress may still emit markup."""
11
+ monkeypatch.setenv("NO_COLOR", "1")
12
+ monkeypatch.delenv("FORCE_COLOR", raising=False)
13
+
14
+ from rich.console import Console as RichConsole
15
+
16
+ def console_factory(*args, **kwargs):
17
+ kwargs = dict(kwargs)
18
+ kwargs["no_color"] = True
19
+ kwargs.setdefault("force_terminal", False)
20
+ return RichConsole(*args, **kwargs)
21
+
22
+ monkeypatch.setattr("rich.console.Console", console_factory)