feat: Add CLI, restructure project, pip packaging#1043
Merged
WEIFENG2333 merged 5 commits intomasterfrom Mar 22, 2026
Merged
Conversation
…ansion bugs - run.sh: Add install_git(), install_ffmpeg() with Homebrew/apt/dnf/pacman support - run.sh: Add BASH_SOURCE guard for curl|bash usage, add error trap, use shallow clone - run.bat: Add install_git and install_ffmpeg via winget with PATH refresh - run.bat: Fix %CD% -> !CD! delayed expansion bug inside if blocks - run.bat: Unify %errorlevel% -> !errorlevel! for delayed expansion consistency Co-Authored-By: Claude Opus 4.6 <[email protected]>
…drop support - platform_utils: Add reveal_in_explorer() to highlight file in system file manager - subtitle_interface: Open and select file after saving subtitle - subtitle_interface: Add delete rows via right-click menu and Delete key - batch_process_interface: Support folder drag-drop with 3-level depth scanning - batch_process_interface/log_window: Replace hardcoded open-folder logic with platform_utils Co-Authored-By: Claude Opus 4.6 <[email protected]>
…tor creation - Add RetranslateThread for lightweight retranslation of selected subtitle rows - Add right-click menu "重新翻译" (Ctrl+T) with concurrent operation protection - Refactor SubtitleThread to use TranslatorFactory via create_translator_from_config() - Save table edits back to file before starting full processing to preserve user changes - Fix QAccessibleTable invalid index warning by clearing selection before model updates - Suppress qfluentwidgets Pro advertisement on startup Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Introduced a progress signal in RetranslateThread to report translation progress as a percentage. - Updated the translator creation to utilize a callback for progress updates. - Enhanced the SubtitleInterface to connect the new progress signal to the optimization progress handler. These changes improve user feedback during the subtitle retranslation process.
…aging Major changes: - Restructure: app/ → videocaptioner/ (core/ + cli/ + ui/ three-layer architecture) - New CLI: 6 commands (transcribe, subtitle, synthesize, process, download, config) - Packaging: pip install videocaptioner (CLI) / videocaptioner[gui] (CLI+GUI) - Single entry: `videocaptioner` opens GUI if installed, otherwise shows CLI help - Config: TOML-based (~/.config/videocaptioner/config.toml) with env var + CLI override - Tests: 50 CLI unit tests, 291 total tests passing - Docs: README rewritten, CLI docs (docs/cli.md), Claude Code Skill (skills/SKILL.md) - CI: GitHub Actions workflow for PyPI trusted publishing - Cleanup: removed legacy-docs/, CHANGELOG.md, main.py; .gitignore rewritten Core bug fixes: - Fix _parallel_translate closure bug (wrong chunk on error recovery) - Fix LLM translator implicit None return being cached for 7 days - Fix bilingual SRT detection hardcoded /50 denominator - Fix merge_segments losing translated_text - Fix Bing translator unbound response variable - Fix shell injection in platform_utils (shell=True) - Fix Google Translate using HTTP instead of HTTPS - Fix ASS subtitle path escaping inconsistency - Fix video_utils subtitle filter checking output extension instead of subtitle extension - Fix MyVideoWidget _formatTime minutes overflow - Fix datetime.utcnow() deprecation in jianying ASR - Fix GPUtil hard import crashing CLI-only installs - Fix diskcache deserialization crash on package rename (graceful degradation) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
app/→videocaptioner/with clean three-layer architecture (core/+cli/+ui/)transcribe,subtitle,synthesize,process,download,configpip install videocaptioner(CLI) /pip install videocaptioner[gui](CLI+GUI)videocaptioneropens GUI if installed, otherwise shows CLI help~/.config/videocaptioner/config.tomlwith env var + CLI arg overrideBreaking Changes
apptovideocaptioner— all imports changedmain.pyremoved — usevideocaptionercommand oruv run videocaptionerinsteadlegacy-docs/removed — content migrated to docs siteTest Plan
uv run ruff check videocaptioner/— 0 errorsuv run pyright videocaptioner/cli/— 0 errorsuv run pytest tests/test_cli/— 50 passeduv run videocaptioner(no args)pip install -e .andpip install -e '.[gui]'verified🤖 Generated with Claude Code