Skip to main content

Pixel-perfect template generator for e-ink devices like Supernote, reMarkable, and Boox

Project description

Table of Contents

  1. Badges
  2. About
  3. Why This Tool?
  4. What this tool is NOT
  5. Features
  6. Installation
    1. Development Version
  7. Full Documentation
  8. Supported Devices
  9. Configuration
  10. Usage Examples
    1. Basic Templates
  11. Output
  12. Contributing
  13. License
  14. Credits

Badges

Python CI Python Version License

About

A device-agnostic command-line tool for generating mathematically balanced, pixel-perfect page templates for e-ink devices. Developed with the Supernote Manta, this tool supports millimeter or pixel specifications for human-readable, technically-precise, or true-scale template configurations.

Why This Tool?

This tool was born from the frustration of online generators that fail to handle "half-lines" or pixel alignment, resulting in uneven, blurry, or aliased lines on high-DPI e-ink screens. This generator calculates exact pixel-perfect margins and spacing based on your device's specific resolution and DPI, ensuring every line is crisp and uniform.

Problem: Blurry Lines (Fractional Pixels) The image on the left (--no-auto-adjust) shows blurry, anti-aliased lines. The image on the right (default) shows the pixel-perfect, crisp lines this tool creates.

"Before" (Blurry) "After" (Pixel-Perfect)
before_pixel_perfect.png after_pixel_perfect.png

Problem: Margin Respect The image on the left (built-in template) shows the margins displaying over the template. The image on the right shows the lines being automatically adjusted to render within the margins.

"Before" (OEM Template) "After" (Pixel-Perfect)
built-in_9mm.png pixel_perfect_9mm.png

Problem: Grid Misalignment The image on the left (default) shows a grid being awkwardly cut off. The image on the right (--force-major-alignment) shows the margins being automatically adjusted to end perfectly on a major grid line.

"Before" (Misaligned) "After" (Force-Aligned)
problem_before_grid_alignment.png problem_after_grid_alignment.png

What this tool is NOT

  • Calendar/Schedule Generator
  • Task/To Do list Generator
  • Color e-ink Template Generator (yet)
  • Real-Time GUI Editor
  • Monetized or Paywalled Tool

Features

  • Pixel-Perfect Alignment: Automatically adjusts margins and spacing to eliminate blurry lines and aliasing artifacts.
  • Multiple Template Types: Generate lined, dotgrid, grid, manuscript, french ruled, music staff, isometric, hexgrid, and hybrid pages.
  • Flexible Layouts: Create single pages, uniform N x M grids, mixed-type grids, and complex, ratio-based layouts using JSON.
  • Decorative Title Pages: Generate artistic cover pages using Truchet tiles, L-System fractals, noise fields, and more.
  • Powerful Customization: Add major/minor lines, decorative separators, line numbers, and axis labels.
  • Flexible Spacing: Define layouts using millimeters (default), exact pixels, or by fitting an exact line count.

Installation

pip install eink-template-gen

Development Version

If you want the latest unreleased features or want to contribute to development, you can install the package directly from this repository.

Clone the repository:

git clone [https://github.com/calebc42/eink-template-gen.git](https://github.com/calebc42/eink-template-gen.git)
cd eink-template-gen

Create and activate a virtual environment:

# On macOS/Linux
python3 -m venv .venv
source .venv/bin/activate

# On Windows
python -m venv .venv
.\.venv\Scripts\activate

Install in editable mode: This links the command eink-template-gen to your local source code, so any changes you make are immediately reflected.

pip install -e .

Full Documentation

For detailed guides, feature deep-dives, and advanced examples, please see the docs/ directory:

Supported Devices

Built-in device profiles:

  • Supernote Manta (10.7", 1920x2560, 300 DPI)
  • Supernote A5 X (10.3", 1404x1872, 226 DPI)
  • Supernote A6 X (7.8", 1404x1872, 300 DPI)
  • Supernote Nomad (7.8", 1404x1872, 300 DPI)

Configuration

Set a default device to avoid specifying --device every time:

eink-template-gen util set-default-device manta
eink-template-gen util set-default-margin 10

Configuration is stored locally in config.json.

Usage Examples

Basic Templates

# Simple lined paper
eink-template-gen lined --spacing 7mm

# Dot grid with major crosshairs
eink-template-gen dotgrid --spacing 5mm --major_every 5

# Graph paper with axis labels
eink-template-gen grid --spacing 5mm --major_every 5 --axis-labels

# Manuscript paper for handwriting practice
eink-template-gen manuscript --spacing 8mm

For more complex examples, including multi, layout, and title commands, see the Advanced Usage Examples documentation.

Output

Templates are saved to out/<device_id>/ by default:

out/
├── manta/
│   ├── lined_7mm_0_5px.png
│   ├── grid_5mm_0_5px_h-wavy.png
│   └── title_truchet_10mm_seed42.png
└── a5x/
    └── lined_6mm_71px.png

Use --output-dir and --filename to customize output location.

Contributing

Contributions are welcome! This project uses:

  • Cairo for high-quality 2D graphics rendering
  • Python 3.8+
  • Pure Python implementation (no external dependencies for noise/fractals)

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Credits

Developed for the Supernote community with love for pixel-perfect templates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eink_template_gen-0.1.2.tar.gz (79.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eink_template_gen-0.1.2-py3-none-any.whl (77.0 kB view details)

Uploaded Python 3

File details

Details for the file eink_template_gen-0.1.2.tar.gz.

File metadata

  • Download URL: eink_template_gen-0.1.2.tar.gz
  • Upload date:
  • Size: 79.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for eink_template_gen-0.1.2.tar.gz
Algorithm Hash digest
SHA256 92bce68199fa281135a3cfa8c3aaf6080038a3101da8f8b9d9df49e666a52a43
MD5 f6f9c069c79aff49c679db2701cc5945
BLAKE2b-256 32dff74f2ab2c857a92f6225125f65652ca3bd145fc8e2a322c83d4d487348d5

See more details on using hashes here.

File details

Details for the file eink_template_gen-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for eink_template_gen-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c52b994112c6d73c88f4439e161343b1aafab92ec3e79b9c2d2bf81d06c5e32
MD5 323958ba4cf9a1285196c4ee8e66968c
BLAKE2b-256 4f05a5e9ca53dd3954eebe39f777f3d89353cc00d958d66b8fe0fd8d15f7f3cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page