Commit graph

959 commits

Author SHA1 Message Date
Your Name
a4489f4945 feat: add OCR language extension configuration and documentation
- Introduced `compose.ocr-languages.yml` for installing additional Tesseract OCR language packs during container startup.
- Updated documentation to include new OCR language extension options and usage scenarios.
- Enhanced existing documentation with references to the new OCR language extension guide.
- Improved test coverage for the deark converter and formats, ensuring accurate format handling and error management.
- Refactored code to streamline file system operations and improve readability.
2026-01-24 00:16:32 +08:00
Your Name
737e925ac7 fix(deark): 合併格式類別,UI 只顯示單一 extract 選項 2026-01-23 23:45:17 +08:00
Your Name
9b4ecadc79 更新轉換器文檔:調整內建內容格式,增強可讀性 2026-01-23 23:35:31 +08:00
Your Name
ef3bf66cce feat: 新增 deark 引擎支援解包/解析多種格式
- 新增 deark 轉換器 (src/converters/deark.ts)
- 支援 100+ 種輸入格式(壓縮檔、舊圖片、字型、可執行檔資源等)
- 輸出為 .tar 封裝
- Dockerfile 添加 deark 從源碼編譯安裝
- 更新 main.ts 註冊新引擎
- 添加單元測試 (tests/converters/deark.test.ts)
- 更新文件 (docs/功能說明/轉換器.md)
- CI/CD 添加 deark 版本驗證
2026-01-23 23:33:26 +08:00
Your Name
2a28e4073a fix: 使用 xvfb-run 解決 GUI 工具在 headless 環境卡住問題 2026-01-23 23:22:11 +08:00
Your Name
80ab233d15 Add comprehensive format integrity tests for various converters 2026-01-23 23:15:36 +08:00
Your Name
47968f6c80 更新轉換器文檔:擴充輸入輸出格式詳情,新增多種格式分類 2026-01-23 22:54:13 +08:00
Your Name
c2ad11db11 更新轉換器文檔:擴充輸入輸出格式詳情,修正格式與描述 2026-01-23 22:51:22 +08:00
Your Name
b2eb66b8c7 更新轉換器文檔:新增 4 種轉換器,修正格式與描述,擴充輸入輸出格式詳情 2026-01-23 22:45:18 +08:00
Your Name
23e9b4aeab Merge branch 'main' of https://github.com/pi-docket/ConvertX-CN 2026-01-23 22:24:30 +08:00
Your Name
5a2aac1a66 Refactor documentation structure: migrate and consolidate multiple files into new organization, update links and references for clarity and accessibility. 2026-01-23 22:24:26 +08:00
evil9369
006256ca92
Update MinerU description in overview document 2026-01-23 22:08:37 +08:00
Your Name
034cc44c25 Merge branch 'main' of https://github.com/pi-docket/ConvertX-CN 2026-01-23 22:05:13 +08:00
Your Name
3f1a5e0fbf Add comprehensive documentation for ConvertX-CN deployment and configuration
- Create 指定版本部署.md to explain fixed version deployment
- Create 最新版.md detailing the use of the latest tag
- Create 版本選擇指南.md to guide users on version selection
- Add Nginx and Traefik configuration examples for reverse proxy
- Introduce minimal and production configuration examples
- Develop Docker deployment guide with detailed steps
- Implement quick start guide for first-time Docker users
- Include version update instructions and rollback procedures
- Add troubleshooting section for common issues
- Enhance overall documentation structure and links for better navigation
2026-01-23 22:05:09 +08:00
evil0119
572ef9fa7f
Merge pull request #3 from pi-docket/copilot/update-file-paths
[WIP] Update file paths for documentation links
2026-01-23 18:55:49 +08:00
copilot-swe-agent[bot]
9507cbf10c Initial plan 2026-01-23 10:55:15 +00:00
evil0119
b2477323ea
Merge pull request #2 from pi-docket/copilot/fix-e2e-test-path
[WIP] Fix path to E2E testing documentation
2026-01-23 18:53:39 +08:00
copilot-swe-agent[bot]
9995dfb58f Initial plan 2026-01-23 10:52:06 +00:00
evil0119
c12333fab6
Merge pull request #1 from pi-docket/copilot/fix-document-path-errors
[WIP] Fix errors in all document paths
2026-01-23 18:49:41 +08:00
copilot-swe-agent[bot]
a3311b2fb1 Initial plan 2026-01-23 10:48:45 +00:00
Your Name
c2d3d13c89 fix: 修復行尾格式(CRLF → LF) 2026-01-23 16:35:54 +08:00
Your Name
a1761b7da5 fix: 修復 pdfOcr.ts 未使用變數的 eslint 錯誤 2026-01-23 16:31:57 +08:00
Your Name
a06df23b1d feat: 新增 OCRmyPDF 轉換引擎 (v0.1.14)
## 新功能
- OCRmyPDF 轉換引擎:將掃描版 PDF 轉換為可搜尋 PDF
  - 支援 7 種語言:en, zh-TW, zh, ja, ko, de, fr
  - 與 PDFMathTranslate 風格一致的 UI 格式 (pdf-<lang>)
  - 自動偵測頁面方向並旋轉
  - 自動校正傾斜
  - 跳過已有文字層的頁面
  - 詳細的 5 階段處理進度輸出

## 建置
- Dockerfile:安裝 ocrmypdf 與 Tesseract OCR 語言包

## 文件
- 更新 OCR 功能文件
- 文件目錄結構改為中文名稱

## 測試
- 修復 BabelDOC 和 PDFMathTranslate 測試的 OCR mock
- 所有 345 個測試通過
2026-01-23 16:28:33 +08:00
Your Name
f24eec070c fix: 更新釋出工作流程中的標籤描述為 v0.1.13,並優化工具版本檢查邏輯 2026-01-23 14:37:56 +08:00
Your Name
da856d89ff feat(i18n): add multilingual support with translations for English, Japanese, and Simplified Chinese
- Create README.md for internationalization (i18n) documentation
- Add English translation for main README and quick start guide
- Add Japanese translation for main README
- Add Simplified Chinese translation for main README
- Introduce sample Docker Compose configurations for various deployment scenarios
- Implement CI/CD documentation for testing and deployment workflows
- Establish end-to-end testing guidelines and strategies
- Create test strategy documentation outlining unit, integration, and E2E tests
2026-01-23 14:32:27 +08:00
Your Name
b3b382d1e0 fix: 修復 CI/CD E2E 測試工作流程 2026-01-23 14:05:38 +08:00
Your Name
bcaddc225c chore: release v0.1.13 - 翻譯測試使用免費服務並修復測試 2026-01-23 12:43:16 +08:00
Your Name
bed996e70b fix: 修正工作流程中的翻譯測試條件和環境變數預設值 2026-01-23 12:30:57 +08:00
Your Name
a2512bf29b fix: 修復 lint 錯誤和代碼格式化
- 移除未使用的導入 (readdirSync, basename, readFileSync, execSync)
- 將不需要重新賦值的 let 改為 const
- 修復 switch case 區塊中的詞法聲明問題
- 移除未使用的 SAMPLING_RATE 和 sampled 變量
- 移除未使用的 _timeout 參數
- 運行 Prettier 格式化所有文件
2026-01-23 12:27:22 +08:00
Your Name
e327345ad7 feat: add comprehensive E2E tests with Docker workflow
- Add comprehensive.e2e.test.ts: Full E2E tests covering 25+ converters
- Add format-matrix.e2e.test.ts: Format conversion matrix (70,000+ combinations)
- Add translation.e2e.test.ts: Multi-language translation tests (14 languages)
- Add docker-e2e-tests.yml: GitHub Actions workflow for Docker E2E tests
- Update run-bun-test.yml: Improved basic test workflow
- Add run-e2e-tests.sh: Local test runner script
- Add test scripts to package.json

Tests cover:
- Image formats (Inkscape, ImageMagick, Potrace, etc.)
- Document formats (Pandoc, LibreOffice, Calibre)
- Data formats (Dasel: JSON/YAML/TOML/XML/CSV)
- Translation (PDFMathTranslate, BabelDOC)
- Edge cases (Unicode, long content, special characters)
2026-01-23 12:20:52 +08:00
Your Name
3457311f14 refactor: 整理環境變數
- 移除重複的環境變數定義
- 統一放置在 Dockerfile 結尾
- 分類整理:Locale、Headless、翻譯服務、離線模式、應用程式
- 添加清晰的註解說明每個變數用途
2026-01-23 12:04:28 +08:00
Your Name
e084d68b95 fix: 增強 headless 環境支援
- 添加 QT_QPA_PLATFORM=offscreen 環境變數
- 添加 DISPLAY=:99 環境變數
- Calibre 轉換器使用 xvfb-run 包裝
- 添加 CALIBRE_USE_SYSTEM_THEME=0

確保 Qt/GTK 應用在無 display 環境下運作
2026-01-23 11:59:47 +08:00
Your Name
0d0c0025fb fix: Inkscape GTK 錯誤 - 使用 xvfb-run 包裝
- 安裝 xvfb 到 Docker image
- 使用 xvfb-run -a 包裝 inkscape 命令
- 設定虛擬螢幕解析度 1024x768x24
- 修復 PNG 轉 SVG 等需要 GTK 的操作

Fixes: Gtk-ERROR Can't create GtkStyleContext without display
2026-01-23 11:57:26 +08:00
Your Name
9fc7217df1 fix: 完善 runtime 離線支援
- 使用 babeldoc --warmup 下載完整資源(模型、字型、cmap、tiktoken)
- 修正驗證邏輯,指向正確的 BabelDOC cache 路徑
- 移除舊的 PDFMATHTRANSLATE_MODELS_PATH 環境變數
- 更新 pdfmathtranslate.ts 使用正確的模型路徑
- 移除手動指定 --onnx 參數(pdf2zh 內部自動處理)

確保所有組件 Runtime 不需要下載任何資源
2026-01-23 11:55:02 +08:00
Your Name
cb8ee290bb fix: 修正 PDFMathTranslate 模型路徑,確保預下載到 babeldoc cache 目錄 2026-01-23 11:48:02 +08:00
Your Name
0bc22411b6 ci: 優化 workflow timeout 和新增手動觸發 2026-01-23 11:29:26 +08:00
Your Name
63f0b57466 chore(release): bump version to 0.1.12 2026-01-23 01:00:18 +08:00
Your Name
31088cf12b fix: 修正表單標籤結構,將文本包裝在 span 中以改善可讀性 2026-01-23 00:52:32 +08:00
Your Name
443cdaa01c refactor(ci): 將 E2E 測試移至服務更新後執行
- docker-build-remote.yml: E2E 測試現在在 Step 20
- 測試在實際部署的 convertx-cn 容器上執行
- 確保服務更新成功後才驗證功能
2026-01-23 00:45:18 +08:00
Your Name
3eec72926f feat(ci): 擴展 CI/CD E2E 測試並新增 Mock 測試
- release.yml: 新增 16 個 Docker 容器 E2E 測試
  - Inkscape (SVG→PNG, SVG→PDF)
  - Pandoc (Markdown→HTML, LaTeX)
  - LibreOffice (TXT→PDF, ODT→DOCX)
  - FFmpeg (音訊、視訊、MP4→GIF)
  - ImageMagick (PNG→JPEG)
  - Calibre (HTML→EPUB)
  - Potrace (PBM→SVG)
  - Tesseract OCR
  - GraphicsMagick, Resvg, VIPS

- docker-build-remote.yml: 新增 21 個遠端 E2E 測試
  - 透過 Tailscale SSH 在遠端 Docker 容器中執行
  - 包含通過/失敗計數和測試摘要

- 新增 Mock 測試 (converters.mock.test.ts)
  - 81 個測試驗證轉換器配置邏輯
  - 不依賴實際工具,可在本地執行
  - 測試 API 結構、格式支援、錯誤處理等
2026-01-23 00:42:12 +08:00
Your Name
56161ed2e1 fix: format E2E tests and add helpers to knip ignore 2026-01-23 00:26:11 +08:00
Your Name
a9f6e1de6f ci: add E2E tests to release workflow
- Add E2E converter tests in Docker container (verify-image job)
  - Inkscape: SVG → PNG
  - Pandoc: Markdown → HTML
  - LibreOffice: TXT → PDF
  - FFmpeg: Audio generation
  - ImageMagick: PNG → JPEG
  - API healthcheck endpoint

- Add cleanup step for verification containers
- Update verification summary to include E2E results
- Install pandoc and imagemagick in run-bun-test workflow for E2E tests
2026-01-23 00:18:03 +08:00
Your Name
840c215597 test(e2e): add End-to-End test suite
Added comprehensive E2E tests:

1. API E2E Tests (api.e2e.test.ts):
   - Healthcheck API testing
   - Static resources verification
   - Module loading tests
   - Converter properties validation
   - File type normalization tests
   - i18n module tests
   - Transfer module tests
   - Database structure tests

2. Converter E2E Tests (converters.e2e.test.ts):
   - Real Inkscape conversions (SVG → PNG/PDF/EPS)
   - Real Pandoc conversions (Markdown → HTML/DOCX/RST)
   - Dasel format conversions (JSON → YAML/TOML)
   - Batch conversion tests
   - Error handling tests
   - Auto-detection of available tools

3. Test Infrastructure:
   - helpers.ts: Tool detection, test file generation
   - fixtures/: Sample test files (SVG, MD, JSON)
   - .gitignore: Exclude output directory

Total: 34 new E2E tests
2026-01-23 00:14:31 +08:00
Your Name
26304a295e fix(inkscape): use headless-safe export syntax (--export-type/--export-filename)
Breaking change from Inkscape 1.0+:
- Old syntax: inkscape input.png -o output.svg (triggers GTK init)
- New syntax: inkscape input.png --export-type=svg --export-filename=output.svg

This is the correct headless-safe approach, no need for xvfb.

Ref: https://inkscape.org/doc/inkscape-man.html
2026-01-23 00:01:24 +08:00
Your Name
b5992a84e0 fix(inkscape): use xvfb-run for headless execution
- Inkscape requires X11 display connection, causing 'GtkStyleContext without display' error
- Solution: use xvfb-run to create virtual X11 display
- Fallback: try direct inkscape if xvfb-run fails
- Add xvfb package to Dockerfile
- Update inkscape tests for new xvfb-run behavior

Fixes: Gtk-ERROR: Can't create a GtkStyleContext without a display connection
2026-01-22 23:56:47 +08:00
Your Name
2f9c418964 Merge branch 'main' of https://github.com/pi-docket/ConvertX-CN 2026-01-22 23:52:28 +08:00
Your Name
4ec60bf696 fix: 更新 bun.lock 中的依賴版本以提升穩定性和安全性 2026-01-22 23:52:25 +08:00
Your Name
d5c9bfa320 feat(ci): add model/headless verification, use --no-ff merge strategy
- Add verify-image job in release.yml with:
  - Headless environment verification (DISPLAY, Xvfb, LibreOffice, Inkscape, Calibre)
  - Model download verification (HuggingFace cache, ONNX models, offline mode)
  - Basic functionality verification (container startup, tool availability)
- Add Test 3 and Test 4 in upstream-sync.yml for headless/model verification
- Update auto-upstream-sync.yml to use git merge --no-ff for better history tracking
2026-01-22 23:51:18 +08:00
evil9369
381de0870d
Update README with testing notes for features 2026-01-22 22:47:53 +08:00
Your Name
89c121bdf9 fix: 簡化 MinerU 和 PDFMathTranslate 的程式碼,改善錯誤處理與參數傳遞 2026-01-22 22:27:40 +08:00