Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
a479951
feat(core): add new PDF job specifications for compression, lineariza…
nedanwr Dec 26, 2025
6706115
feat(core): implement PDF job execution functions for compression, li…
nedanwr Dec 26, 2025
c82f305
chore(.gitignore): add PDF file extension to ignore list
nedanwr Dec 26, 2025
2aa9cb8
refactor(core): update path type in version function and add presets …
nedanwr Dec 26, 2025
9b21c3e
docs(core): clarify description of page specification in pages.rs
nedanwr Dec 26, 2025
6e62449
feat(core): add installation hints for Ghostscript across multiple pl…
nedanwr Dec 26, 2025
d5732c0
test(core): improve tool probe tests for override path and update too…
nedanwr Dec 26, 2025
296164b
feat(core): introduce preset system for compression strategies with h…
nedanwr Dec 26, 2025
ba99053
feat(core): add Ghostscript tool adapter for PDF processing with vers…
nedanwr Dec 26, 2025
e885088
feat(core): add Ghostscript module to tools for enhanced PDF processing
nedanwr Dec 26, 2025
58a4702
feat(cli): enhance PDF command functionality with compression, linear…
nedanwr Dec 26, 2025
dfe7639
feat(cli): integrate Ghostscript tool into check command and update i…
nedanwr Dec 26, 2025
fcfb007
refactor(cli): update command-line interface for improved clarity and…
nedanwr Dec 26, 2025
2e6822e
docs(CONTRIBUTING): update examples and tool adapter references for c…
nedanwr Dec 26, 2025
af87da1
docs(README): update installation instructions to replace pdfcpu with…
nedanwr Dec 26, 2025
b6f28dd
docs(README): replace pdfcpu with Ghostscript in package dependency l…
nedanwr Dec 26, 2025
f7aeb2b
fix(packaging): update Debian package dependencies to replace pdfcpu …
nedanwr Dec 26, 2025
a60f688
fix(packaging): replace pdfcpu dependency with Ghostscript in Homebre…
nedanwr Dec 26, 2025
fed01da
fix(packaging): update RPM spec to replace pdfcpu dependency with Gho…
nedanwr Dec 26, 2025
e0d5225
fix(packaging): update winget manifest to replace pdfcpu dependency w…
nedanwr Dec 26, 2025
d69c16d
feat(pdf): enhance PDF processing functions to support accurate page …
nedanwr Jan 1, 2026
a7539af
docs(pdf): update command examples and help descriptions to reflect n…
nedanwr Jan 1, 2026
f051444
feat(presets): add embedded default presets for PDF processing with `…
nedanwr Jan 1, 2026
0ca7dbb
feat(presets): implement dynamic loading of compression strategies fr…
nedanwr Jan 1, 2026
b74445c
feat(presets): add `PresetsConfig` and `PresetDefinition` structures …
nedanwr Jan 1, 2026
87e55cd
feat(qpdf): add method to retrieve the number of pages in a PDF file
nedanwr Jan 1, 2026
f76c27f
chore(deps): update Cargo.lock to include new packages and their depe…
nedanwr Jan 1, 2026
650eea8
chore(deps): update `serde` dependency to include derive feature and …
nedanwr Jan 1, 2026
b4aeb23
test(presets): add unit tests for loading presets configuration and v…
nedanwr Jan 1, 2026
959b7c4
test(presets): add comprehensive unit tests for `PresetsConfig` and `…
nedanwr Jan 1, 2026
9a8eae9
test(qpdf): add unit tests for page count retrieval in empty and none…
nedanwr Jan 1, 2026
f288a85
docs(pdf): update compression level documentation to include 'xhigh' …
nedanwr Jan 1, 2026
483ae7f
feat(presets): add 'xhigh' preset for extreme compression with additi…
nedanwr Jan 1, 2026
6096c65
chore(roadmap): update version to v0.0.4, complete PDF advanced opera…
nedanwr Jan 1, 2026
59ad9bf
chore(ci): add GitHub Actions CI workflow for testing and linting acr…
nedanwr Jan 1, 2026
ed95ff6
feat(pr-template): add a pull request template to standardize contrib…
nedanwr Jan 1, 2026
c9c5db6
docs(temp): update example in `create_temp_file_near` to use `std::en…
nedanwr Jan 1, 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
57 changes: 57 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## Description

<!-- Provide a brief description of the changes in this PR -->

## Type of Change

<!-- Mark the relevant option with an "x" -->

- [ ] `feat`: New feature
- [ ] `fix`: Bug fix
- [ ] `docs`: Documentation only
- [ ] `refactor`: Code refactoring (no behavior change)
- [ ] `perf`: Performance improvement
- [ ] `test`: Adding or updating tests
- [ ] `build`: Build system or dependencies
- [ ] `ci`: CI/workflow changes
- [ ] `chore`: Maintenance tasks

## Scope

<!-- Which part of the codebase does this affect? -->

- [ ] `cli` - CLI commands and interface
- [ ] `core` - Core library functionality
- [ ] `tools` - Tool integrations (qpdf, ghostscript, etc.)
- [ ] `pdf` - PDF-specific operations
- [ ] `packaging` - Package configurations
- [ ] Other: <!-- specify -->

## Related Issues

<!-- Link any related issues using "Closes #123" or "Refs #123" -->

## Checklist

- [ ] I have read the [commit convention](./COMMIT_CONVENTION.md)
- [ ] My commits follow the conventional format: `type(scope): description`
- [ ] I have added/updated tests as appropriate
- [ ] All tests pass locally (`cargo test`)
- [ ] Code passes lint checks (`cargo clippy` and `cargo fmt`)
- [ ] I have updated documentation if needed

## Breaking Changes

<!-- If this PR introduces breaking changes, describe them here -->

- [ ] This PR contains breaking changes

<!-- If yes, explain what breaks and how users should migrate -->

## Screenshots / Output

<!-- If applicable, add screenshots or command output demonstrating the changes -->

```
# Example command output
```
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: ["*"]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

# Install dependencies for integration tests
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y qpdf ghostscript

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install qpdf ghostscript

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
choco install qpdf ghostscript --yes

- name: Build
run: cargo build --all-targets

- name: Run tests
run: cargo test --all-targets

- name: Run doc tests
run: cargo test --doc

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2

- name: Check formatting
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ desktop.ini
*.tmp
*.temp


# PDF files
*.pdf
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ForgeKit is organized as a Rust workspace with two main crates:

- A `JobSpec` describes what you want to do (merge PDFs, resize images, etc.)
- It's pure data - no execution logic
- Examples: `PdfMerge`, `PdfSplit`, `ImageConvert` (coming soon)
- Examples: `PdfMerge`, `PdfSplit`, `PdfCompress`

**Tools** (`crates/core/src/tools/`)

Expand Down Expand Up @@ -94,13 +94,13 @@ ForgeKit is organized as a Rust workspace with two main crates:
}
```

2. **Create a tool adapter** (`crates/core/src/tools/pdfcpu.rs`):
2. **Create a tool adapter** (`crates/core/src/tools/gs.rs`):

```rust
pub struct PdfcpuTool;
pub struct GsTool;

impl Tool for PdfcpuTool {
fn name(&self) -> &'static str { "pdfcpu" }
impl Tool for GsTool {
fn name(&self) -> &'static str { "gs" }
fn probe(&self, config: &ToolConfig) -> Result<ToolInfo> { /* ... */ }
fn version(&self, path: &PathBuf) -> Result<String> { /* ... */ }
}
Expand Down Expand Up @@ -178,7 +178,7 @@ Keep commits focused and descriptive:
Add PDF compression support

- Add PdfCompress JobSpec variant
- Implement pdfcpu tool adapter
- Implement Ghostscript tool adapter
- Add pdf compress CLI subcommand
- Add tests for compression levels
```
Expand Down
42 changes: 42 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ Then install them based on your platform:
**macOS (Homebrew):**

```bash
brew install qpdf pdfcpu tesseract ffmpeg libvips exiftool
brew install qpdf ghostscript tesseract ffmpeg libvips exiftool
pip3 install ocrmypdf
```

**Windows (winget/scoop):**

```powershell
winget install qpdf.qpdf pdfcpu.pdfcpu tesseract-ocr Gyan.FFmpeg
winget install qpdf.qpdf ArtifexSoftware.GhostScript tesseract-ocr Gyan.FFmpeg
scoop install libvips exiftool
pip install ocrmypdf
```
Expand All @@ -121,21 +121,21 @@ pip install ocrmypdf
**Debian/Ubuntu:**

```bash
sudo apt install qpdf pdfcpu tesseract-ocr ffmpeg libvips-tools libimage-exiftool-perl python3-pip
sudo apt install qpdf ghostscript tesseract-ocr ffmpeg libvips-tools libimage-exiftool-perl python3-pip
pip3 install ocrmypdf
```

**Fedora/RHEL:**

```bash
sudo dnf install qpdf pdfcpu tesseract ffmpeg libvips perl-Image-ExifTool python3-pip
sudo dnf install qpdf ghostscript tesseract ffmpeg libvips perl-Image-ExifTool python3-pip
pip3 install ocrmypdf
```

**Arch Linux:**

```bash
sudo pacman -S qpdf pdfcpu tesseract ffmpeg libvips perl-image-exiftool python-pip
sudo pacman -S qpdf ghostscript tesseract ffmpeg libvips perl-image-exiftool python-pip
pip3 install ocrmypdf
```

Expand All @@ -148,7 +148,7 @@ pip3 install ocrmypdf
- **Merge**: Combine multiple PDFs into one
- **Split**: Extract pages by ranges or keywords
- **Linearize**: Optimize for fast web view
- **Compress**: Reduce file size with presets (coming soon)
- **Compress**: Reduce file size with Ghostscript presets
- **OCR**: Add searchable text layer (coming soon)
- **Metadata**: View/edit PDF metadata (coming soon)

Expand Down
Loading