Repository navigation
Development ja
kudryavskiy_rv edited this page Jul 5, 2026
·
1 revision
git clone https://github.com/devpilgrin/office-print.git
cd office-print
cargo build
cargo test --workspaceRust ≥ 1.89 が必要(2024エディション)。
crates/
├── office-print/ # コアライブラリ(wasm, pdf-ops, typescript)
└── office-print-cli/ # CLI(server)
cargo build # デバッグ
cargo build --release # リリース
cargo build --features wasm # WASM 含むcargo test --workspace # 全テスト
cargo test -p office-print --test docx_fixtures # DOCX
cargo test -p office-print --test xlsx_fixtures # XLSX
cargo test -p office-print --test pptx_fixtures # PPTXPDF 検証には qpdf が必要:
sudo apt install qpdf # Linux
brew install qpdf # macOS検証付き実行:
office_print_VALIDATE_PDF=1 cargo test --workspacecargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warningsテストフィクスチャは tests/fixtures/{docx,pptx,xlsx}/ にあります。実際の Office 文書です。libreoffice/ と poi/ 内のフィクスチャは非公開です。
main へのプッシュと PR で実行: check、test、clippy、fmt — すべて ubuntu-latest。
cargo build --release -p office-print-cli
# バイナリ: target/release/office-print[.exe]office-print/
├── crates/
│ ├── office-print/src/
│ │ ├── config.rs # ConvertOptions, Format, OutputFormat
│ │ ├── error.rs # ConvertError, ConvertWarning, OutputData
│ │ ├── ir/ # 中間表現
│ │ ├── parser/ # DOCX, PPTX, XLSX パーサー
│ │ ├── pdf.rs # Typst コンパイルと PDF レンダリング
│ │ ├── render/ # PNG/JPEG ラスタライズ
│ │ └── wasm.rs # WASM バインディング
│ └── office-print-cli/src/
│ └── main.rs # CLI エントリポイント
├── tests/fixtures/ # テストフィクスチャ
├── build/ # リリースビルド(gitignore)
├── doc/ # プロジェクト文書
└── README.md
📖 English Docs