Desktop utility for typography workflows: batch-read PDF page sizes, compute linear meters, and group by format (ISO A-series with tolerance).
src/PrintMeter.Core— domain models, tolerance/rounding defaults, batch analysissrc/PrintMeter.Pdf—PdfPigpage dimension readersrc/PrintMeter.App.ViewModels— MVVM layer (testable on macOS/Linux)src/PrintMeter.App— WinUI + hosting + Serilog (Windows only)tests/*— xUnit + FluentAssertions
dotnet restore PrintMeter.sln
dotnet build PrintMeter.sln -c Release
dotnet test PrintMeter.sln -c Release --no-buildThis is what PR CI runs (fast quality gate only).
dotnet publish src/PrintMeter.App/PrintMeter.App.csproj -c Release -r win-x64 --self-contained true ^
-p:PublishSingleFile=true ^
-p:IncludeNativeLibrariesForSelfExtract=true ^
-p:EnableCompressionInSingleFile=true ^
-p:PublishTrimmed=false ^
-p:PublishReadyToRun=true ^
-o ./artifacts/publishOutput: artifacts/publish/PrintMeter.exe (plus satellite files if any).
Installer script: installer/PrintMeter.iss.
On Windows with Inno Setup installed:
iscc /DMyAppVersion=1.0.0 installer/PrintMeter.issOutput: artifacts/installer/PrintMeter-Setup-x64.exe.
Installer behavior:
- installs per-machine into
Program Files - creates Start Menu shortcut for all users (
{commonprograms}) - optional Desktop shortcut for all users (
{commondesktop})
Silent install examples:
PrintMeter-Setup-x64.exe /VERYSILENT /NORESTART /SP-PrintMeter-Setup-x64.exe /VERYSILENT /NORESTART /SP- /TASKS="desktopicon"WPF (PrintMeter.App) does not build on macOS. Use the solution filter:
dotnet restore PrintMeter.Mac.slnf
dotnet build PrintMeter.Mac.slnf -c Release
dotnet test PrintMeter.Mac.slnf -c Release --no-buildWindows UI + publish are verified in GitHub Actions (windows-latest).
src/PrintMeter.App/appsettings.json:
PrintMeter:MaxDegreeOfParallelism— parallel PDF reads (default4)PrintMeter:FormatToleranceMm— ISO match tolerance in mm (default2)- Pricelist-style “billing sheet count” uses built-in nominal long-edge mm per ISO label (
PricelistFormatEquivalence.IsoNominalLongEdgeMm) and rounding fromPricelistFormatEquivalence.DefaultRounding— not configured via appsettings unless you extend the code
Logs: %LocalAppData%/PrintMeter/logs/.
See docs/VALIDATION.md.
Versioning is automated with Release Please:
- workflow:
.github/workflows/versioning.yml - config:
release-please-config.json - manifest state:
.release-please-manifest.json - Token:
versioning.ymluses the default GITHUB_TOKEN fromrelease-please-action@v4(notoken:override). Addtoken: ${{ secrets.RELEASE_PLEASE_TOKEN }}to that step only if your org forbids releases/PRs fromGITHUB_TOKEN; use a classic PAT withreposcope (fine‑grained PATs often need Contents + Pull requests + Issues R/W and Actions read-only — see release-please-action#1048). A badRELEASE_PLEASE_TOKENrepo secret commonly causes Resource not accessible by integration — delete that secret and rely on GITHUB_TOKEN, or recreate the PAT / authorize SSO for the org account. - Stuck merged release PR (
autorelease: pendingblocking new bumps): run workflow release-please-unstick (dispatch) with the merged PR number, or edit labels on that PR manually. - If create release still fails with integration/403 even with no PAT secret: set Settings → Actions → General → Workflow permissions to Read and write for the repository (ensure the org policy is not capped at read‑only).
How it works:
- Push commits to
mainusing Conventional Commit style (feat:,fix:,chore:). - Release Please opens/updates a release PR with next SemVer bump and changelog.
- When that PR is merged, the next run of Release Please on
maincreates the GitHub Release and git tagvX.Y.Z. - Job
publish-release-assetsbuilds the installer/zip and uploads assets onto that existing release (softprops/action-gh-release).PrintMeter-Setup-x64.exePrintMeter-win-x64.zip
- If assets are missing for an existing release (immutable releases), run
versioningmanually withrelease_tag(for examplev0.2.3) to backfill assets.
Manual release workflow responsibilities:
release.ymlis kept as manual fallback (workflow_dispatch).
- Conventional Commits are required (
feat:,fix:,chore:, etc.). - Workflow
.github/workflows/commitlint.ymlvalidates commit messages on PRs and pushes tomain. - Cursor project rule for this is stored in
.cursor/rules/release-versioning.mdc. - PR titles should also follow Conventional Commit format (
fix(winui): ...,feat(dotnet): ...) because squash-merge uses the PR title as the resulting commit message onmain. - For merges into
main, use Squash and merge (preferred) or Rebase and merge. - Avoid plain merge commits (
Merge pull request #...), as they are not Conventional Commits and can break Release Please parsing.