├── .env.example ├── .github └── workflows │ ├── docker-publish.yml │ └── docker-test.yml ├── .gitignore ├── DOCKER.md ├── deployment ├── .dockerignore ├── .env.docker.example ├── Dockerfile ├── TESTING.md ├── data │ └── jobs.db ├── docker-compose.yml ├── test_docker.bat └── test_docker.sh ├── docs ├── DOCKER_DEPLOYMENT.md └── README.md ├── prompts ├── __init__.py └── prompts.py ├── requirements.txt ├── scripts ├── fix_installation.py └── setup_config.py ├── src ├── __init__.py ├── api │ ├── __init__.py │ ├── blueprints │ │ ├── __init__.py │ │ ├── config_routes.py │ │ ├── file_routes.py │ │ ├── security_routes.py │ │ └── translation_routes.py │ ├── handlers.py │ ├── routes.py │ ├── services │ │ ├── __init__.py │ │ ├── file_service.py │ │ └── path_validator.py │ ├── translation_state.py │ └── websocket.py ├── config.py ├── core │ ├── __init__.py │ ├── context_optimizer.py │ ├── epub │ │ ├── __init__.py │ │ ├── constants.py │ │ ├── epub_fast_processor.py │ │ ├── job_collector.py │ │ ├── tag_preservation.py │ │ ├── translator.py │ │ └── xml_helpers.py │ ├── llm_client.py │ ├── llm_providers.py │ ├── post_processor.py │ ├── srt_processor.py │ ├── subtitle_translator.py │ ├── text_processor.py │ └── translator.py ├── persistence │ ├── __init__.py │ ├── checkpoint_manager.py │ └── database.py ├── utils │ ├── __init__.py │ ├── env_helper.py │ ├── file_detector.py │ ├── file_utils.py │ ├── security.py │ └── unified_logger.py └── web │ ├── __init__.py │ ├── static │ ├── TBL-Logo.png │ ├── favicon.svg │ ├── js │ │ ├── core │ │ │ ├── api-client.js │ │ │ ├── state-manager.js │ │ │ └── websocket-manager.js │ │ ├── files │ │ │ ├── file-manager.js │ │ │ └── file-upload.js │ │ ├── index.js │ │ ├── providers │ │ │ ├── model-detector.js │ │ │ └── provider-manager.js │ │ ├── translation │ │ │ ├── batch-controller.js │ │ │ ├── progress-manager.js │ │ │ ├── resume-manager.js │ │ │ └── translation-tracker.js │ │ ├── ui │ │ │ ├── dom-helpers.js │ │ │ ├── form-manager.js │ │ │ └── message-logger.js │ │ └── utils │ │ │ ├── lifecycle-manager.js │ │ │ └── validators.js │ └── style.css │ └── templates │ └── translation_interface.html ├── start.bat ├── translate.py └── translation_api.py /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/.env.example -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/.github/workflows/docker-publish.yml -------------------------------------------------------------------------------- /.github/workflows/docker-test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/.github/workflows/docker-test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/.gitignore -------------------------------------------------------------------------------- /DOCKER.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/DOCKER.md -------------------------------------------------------------------------------- /deployment/.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/.dockerignore -------------------------------------------------------------------------------- /deployment/.env.docker.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/.env.docker.example -------------------------------------------------------------------------------- /deployment/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/Dockerfile -------------------------------------------------------------------------------- /deployment/TESTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/TESTING.md -------------------------------------------------------------------------------- /deployment/data/jobs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/data/jobs.db -------------------------------------------------------------------------------- /deployment/docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/docker-compose.yml -------------------------------------------------------------------------------- /deployment/test_docker.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/test_docker.bat -------------------------------------------------------------------------------- /deployment/test_docker.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/deployment/test_docker.sh -------------------------------------------------------------------------------- /docs/DOCKER_DEPLOYMENT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/docs/DOCKER_DEPLOYMENT.md -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/docs/README.md -------------------------------------------------------------------------------- /prompts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/prompts/__init__.py -------------------------------------------------------------------------------- /prompts/prompts.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/prompts/prompts.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/requirements.txt -------------------------------------------------------------------------------- /scripts/fix_installation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/scripts/fix_installation.py -------------------------------------------------------------------------------- /scripts/setup_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/scripts/setup_config.py -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | TranslateBookWithLLM - Main package 3 | """ -------------------------------------------------------------------------------- /src/api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/__init__.py -------------------------------------------------------------------------------- /src/api/blueprints/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/blueprints/__init__.py -------------------------------------------------------------------------------- /src/api/blueprints/config_routes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/blueprints/config_routes.py -------------------------------------------------------------------------------- /src/api/blueprints/file_routes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/blueprints/file_routes.py -------------------------------------------------------------------------------- /src/api/blueprints/security_routes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/blueprints/security_routes.py -------------------------------------------------------------------------------- /src/api/blueprints/translation_routes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/blueprints/translation_routes.py -------------------------------------------------------------------------------- /src/api/handlers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/handlers.py -------------------------------------------------------------------------------- /src/api/routes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/routes.py -------------------------------------------------------------------------------- /src/api/services/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/services/__init__.py -------------------------------------------------------------------------------- /src/api/services/file_service.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/services/file_service.py -------------------------------------------------------------------------------- /src/api/services/path_validator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/services/path_validator.py -------------------------------------------------------------------------------- /src/api/translation_state.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/translation_state.py -------------------------------------------------------------------------------- /src/api/websocket.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/api/websocket.py -------------------------------------------------------------------------------- /src/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/config.py -------------------------------------------------------------------------------- /src/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/__init__.py -------------------------------------------------------------------------------- /src/core/context_optimizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/context_optimizer.py -------------------------------------------------------------------------------- /src/core/epub/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/__init__.py -------------------------------------------------------------------------------- /src/core/epub/constants.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/constants.py -------------------------------------------------------------------------------- /src/core/epub/epub_fast_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/epub_fast_processor.py -------------------------------------------------------------------------------- /src/core/epub/job_collector.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/job_collector.py -------------------------------------------------------------------------------- /src/core/epub/tag_preservation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/tag_preservation.py -------------------------------------------------------------------------------- /src/core/epub/translator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/translator.py -------------------------------------------------------------------------------- /src/core/epub/xml_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/epub/xml_helpers.py -------------------------------------------------------------------------------- /src/core/llm_client.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/llm_client.py -------------------------------------------------------------------------------- /src/core/llm_providers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/llm_providers.py -------------------------------------------------------------------------------- /src/core/post_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/post_processor.py -------------------------------------------------------------------------------- /src/core/srt_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/srt_processor.py -------------------------------------------------------------------------------- /src/core/subtitle_translator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/subtitle_translator.py -------------------------------------------------------------------------------- /src/core/text_processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/text_processor.py -------------------------------------------------------------------------------- /src/core/translator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/core/translator.py -------------------------------------------------------------------------------- /src/persistence/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/persistence/__init__.py -------------------------------------------------------------------------------- /src/persistence/checkpoint_manager.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/persistence/checkpoint_manager.py -------------------------------------------------------------------------------- /src/persistence/database.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/persistence/database.py -------------------------------------------------------------------------------- /src/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/utils/__init__.py -------------------------------------------------------------------------------- /src/utils/env_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/utils/env_helper.py -------------------------------------------------------------------------------- /src/utils/file_detector.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/utils/file_detector.py -------------------------------------------------------------------------------- /src/utils/file_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/utils/file_utils.py -------------------------------------------------------------------------------- /src/utils/security.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/utils/security.py -------------------------------------------------------------------------------- /src/utils/unified_logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/utils/unified_logger.py -------------------------------------------------------------------------------- /src/web/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Web interface modules 3 | """ -------------------------------------------------------------------------------- /src/web/static/TBL-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/TBL-Logo.png -------------------------------------------------------------------------------- /src/web/static/favicon.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/favicon.svg -------------------------------------------------------------------------------- /src/web/static/js/core/api-client.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/core/api-client.js -------------------------------------------------------------------------------- /src/web/static/js/core/state-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/core/state-manager.js -------------------------------------------------------------------------------- /src/web/static/js/core/websocket-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/core/websocket-manager.js -------------------------------------------------------------------------------- /src/web/static/js/files/file-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/files/file-manager.js -------------------------------------------------------------------------------- /src/web/static/js/files/file-upload.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/files/file-upload.js -------------------------------------------------------------------------------- /src/web/static/js/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/index.js -------------------------------------------------------------------------------- /src/web/static/js/providers/model-detector.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/providers/model-detector.js -------------------------------------------------------------------------------- /src/web/static/js/providers/provider-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/providers/provider-manager.js -------------------------------------------------------------------------------- /src/web/static/js/translation/batch-controller.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/translation/batch-controller.js -------------------------------------------------------------------------------- /src/web/static/js/translation/progress-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/translation/progress-manager.js -------------------------------------------------------------------------------- /src/web/static/js/translation/resume-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/translation/resume-manager.js -------------------------------------------------------------------------------- /src/web/static/js/translation/translation-tracker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/translation/translation-tracker.js -------------------------------------------------------------------------------- /src/web/static/js/ui/dom-helpers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/ui/dom-helpers.js -------------------------------------------------------------------------------- /src/web/static/js/ui/form-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/ui/form-manager.js -------------------------------------------------------------------------------- /src/web/static/js/ui/message-logger.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/ui/message-logger.js -------------------------------------------------------------------------------- /src/web/static/js/utils/lifecycle-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/utils/lifecycle-manager.js -------------------------------------------------------------------------------- /src/web/static/js/utils/validators.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/js/utils/validators.js -------------------------------------------------------------------------------- /src/web/static/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/static/style.css -------------------------------------------------------------------------------- /src/web/templates/translation_interface.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/src/web/templates/translation_interface.html -------------------------------------------------------------------------------- /start.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/start.bat -------------------------------------------------------------------------------- /translate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/translate.py -------------------------------------------------------------------------------- /translation_api.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hydropix/TranslateBookWithLLM/HEAD/translation_api.py --------------------------------------------------------------------------------