Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0fc55d2
Rust rewrite phase 1: eat binary (pdfium pipeline, 8-language rubrics…
Nov 10, 2026
43b2b8f
Rust phase 2: scanned/handwritten OCR (eat-ocr) + streaming loop-cut
Nov 10, 2026
3960a99
Rust phase 3: teacher GUI, shared app crate, CJK font, scan tags, .ap…
Nov 10, 2026
125e41a
Rust phase 4: Ollama auto-install wizard, Windows dist, live camera
Nov 10, 2026
b7d6dfa
OCR accuracy: model profiles + VLM line reader (hybrid engine)
Nov 10, 2026
a874874
OCR speed: VLM stacked-image correction — 24 min → 2.7 min/page
Nov 11, 2026
37c2f8e
Rubric scoring pass + drop page-number prefix in error display
Nov 11, 2026
4d87876
批改流程整合:句級錯誤明細+規準評分進入批次與 GUI
Nov 11, 2026
1b5167d
錯誤明細改為每份作文一個 CSV(一個文檔一個明細)
Nov 11, 2026
109e93c
批改標準輸入欄+評分佔比設定
Nov 11, 2026
cc49e61
每個評分維度可編輯自己的標準說明(如 Standard 1/2 原文)
Nov 11, 2026
4aeb994
評分維度新增/刪除按鈕+空維度防護
Nov 11, 2026
62424a5
瀏覽批改模式:左側標註原稿、右側錯誤條列、方向鍵導覽
Nov 11, 2026
9a46aa7
瀏覽批改:方向鍵旋轉原稿(↑=+90°、↓=-90°)
Nov 11, 2026
9ea9f08
GitHub CI/CD:macOS+Windows 建置、測試、打包、發布 workflow
Nov 11, 2026
47ec5c6
通用 API 端點檢查+API key 支援(不限 Ollama)
Nov 11, 2026
28821ab
修復:API 狀態被 take() 消費導致永遠卡在「正在檢查」
Nov 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Build & Test

on:
push:
branches: [main, rust-rewrite]
pull_request:
branches: [main, rust-rewrite]

env:
CARGO_TERM_COLOR: always

jobs:
test:
strategy:
matrix:
include:
- os: macos-14
target: aarch64-apple-darwin
name: macOS-arm64
- os: windows-latest
target: x86_64-pc-windows-msvc
name: Windows-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: eat-rs
key: ${{ matrix.target }}

- name: Run tests
working-directory: eat-rs
run: cargo test --release

package-macos:
needs: test
if: github.ref == 'refs/heads/rust-rewrite' || startsWith(github.ref, 'refs/tags/')
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- uses: swatinem/rust-cache@v2
with:
workspaces: eat-rs
key: aarch64-apple-darwin

- name: Build release
working-directory: eat-rs
run: cargo build --release -p eat-cli -p eat-gui

- name: Assemble .app
working-directory: eat-rs
run: ./scripts/make-app.sh dist

- name: Codesign (ad-hoc)
run: |
codesign --force --deep --sign - "eat-rs/dist/Project-EAT.app"

- name: Upload .app artifact
uses: actions/upload-artifact@v4
with:
name: Project-EAT-macos-arm64
path: eat-rs/dist/Project-EAT.app
retention-days: 30

package-windows:
needs: test
if: github.ref == 'refs/heads/rust-rewrite' || startsWith(github.ref, 'refs/tags/')
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- uses: swatinem/rust-cache@v2
with:
workspaces: eat-rs
key: x86_64-pc-windows-msvc

- name: Build release (MSVC)
working-directory: eat-rs
shell: pwsh
run: cargo build --release -p eat-cli -p eat-gui

- name: Assemble Windows dist
working-directory: eat-rs
shell: pwsh
run: |
$app = "dist/win/Project-EAT-win"
New-Item -ItemType Directory -Force -Path "$app/models", "$app/fonts"

Copy-Item target/release/eat.exe "$app/"
Copy-Item target/release/eat-gui.exe "$app/Project-EAT.exe"

# pdfium.dll (vendored)
Copy-Item vendor/pdfium-win-x64/pdfium.dll "$app/"

# onnxruntime.dll: download from Microsoft release (ort load-dynamic)
$ortVer = "1.31.0"
$url = "https://github.com/microsoft/onnxruntime/releases/download/v$ortVer/onnxruntime-win-x64-$ortVer.zip"
Invoke-WebRequest -Uri $url -OutFile ort.zip
Expand-Archive ort.zip -DestinationPath ort -Force
Copy-Item "ort/onnxruntime-win-x64-$ortVer/lib/onnxruntime.dll" "$app/"

# PP-OCR models + font
Copy-Item vendor/ppocr/PP-OCRv6_det_small.onnx "$app/models/"
Copy-Item vendor/ppocr/PP-OCRv6_rec_small.onnx "$app/models/"
Copy-Item vendor/ppocr/rec_keys.txt "$app/models/"
Copy-Item vendor/fonts/NotoSansCJKtc-Regular.otf "$app/fonts/"

# zip
Compress-Archive -Path $app -DestinationPath dist/win/Project-EAT-win-x64.zip

- name: Upload Windows zip
uses: actions/upload-artifact@v4
with:
name: Project-EAT-windows-x64
path: eat-rs/dist/win/Project-EAT-win-x64.zip
retention-days: 30

release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [package-macos, package-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: Project-EAT-*
merge-multiple: false

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
Project-EAT-macos-arm64/**
Project-EAT-windows-x64/*
generate_release_notes: true
29 changes: 2 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,2 @@
# Python
__pycache__/
*.pyc

# macOS
.DS_Store

# Tooling
.spectra/
.opencode/
.agent/
openspec/
docs/

# Large media (demo recordings)
*.mov

# Generated outputs
pdfs_annotated*/
pdfs_annotated.zip
pretest_posttest_output/
*_annotated.pdf
*_ocr.json
*_errors.json

# Misc
sampleREADME.md
eat-rs/dist/
dist/
2 changes: 2 additions & 0 deletions eat-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
**/target
Loading