Skip to content

Repository files navigation

Inkstone

Inkstone is a local-first figure readability checker for academic papers. It accepts either individual figure images or a PDF, measures visual density and final-size text, and produces PASS / WARNING / FAIL guidance without sending the selected files anywhere.

Inkstone is an independent authoring aid. It is not affiliated with ISSCC or MiraSmart, and its score is not an acceptance criterion.

Quick start

Requirements: Python 3.9+ and a current Chromium, Chrome, Edge, or Firefox. No Python or JavaScript packages are required.

git clone https://github.com/Devil-SX/inkstone.git
cd inkstone
python3 serve.py

Open http://127.0.0.1:8765/.

Image workflow

  1. Choose one or more PNG, JPEG, or WebP figures.
  2. Enter the width at which each figure will appear in print.
  3. Select diagram/plot, table, or photo thresholds.
  4. Keep local OCR enabled when the figure contains text.
  5. Analyze, then export JSON or print the report.

The default width is 3.94 inches, approximately 283.6 points. Physical width matters: OCR can only estimate a final font size after pixels are mapped to an intended print size. Density and whitespace ratios do not depend on this value, but the point-size warnings do.

PDF workflow

PDF mode looks for captions that begin with Fig. N near the left edge of a column, then checks the figure region above each caption. Vector text is read directly from the PDF; OCR is used only when a detected figure has a sparse text layer. This mode works with a figure-template PDF or a paper PDF that follows the caption convention.

What is checked

  • overall and peak edge density;
  • ink coverage and whitespace;
  • locally dense subregions;
  • total text characters;
  • characters estimated below 7.5 pt, 5 pt, and 4 pt;
  • a weighted readability score with separate table and photo handling.

Treat every warning as a review checklist. The final check is still whether a human can interpret the downsampled or printed figure at normal reading distance.

Privacy and offline behavior

All file reads use browser File/Blob APIs. Inkstone has no upload endpoint, analytics, telemetry, or runtime CDN dependency. PDF.js, Tesseract.js, both OCR WebAssembly variants, and the English trained-data file are vendored in this repository, so PDF rendering and OCR continue to work after the repository has been cloned and the machine is offline. The application also ships a Content Security Policy that limits scripts, workers, and network connections to its own origin.

Run the privacy guard before publishing changes:

npm test
npm run privacy

The privacy guard rejects common absolute-path, private-project, credential, and secret patterns. It complements code review; it is not a secret scanner.

Development

The browser application uses plain JavaScript modules and has no build step. See ARCHITECTURE.md for adapter and scoring boundaries. Third-party versions, licenses, source URLs, and hashes are recorded in THIRD_PARTY.md.

Source basis

License

Inkstone is MIT licensed. Vendored components retain their upstream licenses; see THIRD_PARTY.md.

About

Local-first academic figure density and readability checker with PDF/image inputs and offline OCR

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages