Skip to main content

Svalboard Keymap Image Maker

Project description

qmk-skim (Svalboard Keymap Image Maker)

Coverage Python Version Build Status PyPI version

A Python CLI tool for generating high-quality keymap layout images for the Svalboard keyboard.

Features

  • Generate individual layer keymap images with layer indicator circles
  • Generate overview images showing all layers with connector lines
  • Interactive TUI configurator for editing configuration files
  • System dependency checker (skim doctor)
  • Support for multiple keymap formats:
    • Keybard (.kbi)
    • Vial (.vil)
    • QMK c2json (.json)
  • Configurable colors, layer names, and appearance
  • High-quality output in multiple formats:
    • Vector: SVG
    • Raster: PNG, JPEG, WEBP, AVIF
  • Stdin support for piping keymap data in scripts

Installation

You can install qmk-skim using pip, pipx, or uv.

Using uv (Recommended)

uv tool install qmk-skim

Using pipx

pipx install qmk-skim

Using pip

pip install qmk-skim

Usage

The package installs the skim command-line tool, but if you prefer to use the tool without installing it, you can use uvx:

uvx --python 3.10 --from 'qmk-skim[cairo,playwright]' skim doctor

Check your environment

# Verify system dependencies (render engines, etc.)
skim doctor

Generate keymap images

# Generate all layers + overview from a keymap file
skim generate --keymap my-keymap.kbi --output-dir ./images

# Generate with custom configuration
skim generate --keymap my-keymap.kbi --config skim-config.yaml --output-dir ./images

# Generate specific layers only
skim generate --keymap my-keymap.kbi --layer 1 --layer 3-5 --layer overview

# Generate PNG output (requires Chromium or Cairo)
skim generate --keymap my-keymap.kbi --format png --output-dir ./images

# Read keymap from stdin
cat my-keymap.json | skim generate - --output-dir ./images

Configure appearance

# Launch the interactive TUI configurator
skim configure --interactive

# Edit an existing configuration file in the TUI
skim configure --interactive --config skim-config.yaml

# Generate a config from a Keybard keymap (extracts layer colors, names, custom keycodes)
skim configure --keymap my-keymap.kbi --output skim-config.yaml

# Import QMK named colors from color.h
skim configure --keymap my-keymap.kbi --qmk-color-header /path/to/color.h --output skim-config.yaml

Development

This project uses uv for dependency management and just as a command runner.

Setup

# Clone the repository
git clone https://github.com/Townk/skim.git
cd skim

# Install dependencies (dev + docs + extras)
just sync

Testing

# Run all tests (unit + integration) with coverage
just tests

# Run only unit tests
just unit-tests

# Run only integration tests
just integration-tests

Code Quality

# Run all checks (lint, format, type check)
just check

# Quick feedback loop (format + lint + typecheck)
just quick-check

# Full CI pipeline (all checks + all tests)
just ci

Individual checks:

just lint          # Run ruff linter
just format        # Format code with ruff
just format-check  # Check formatting without modifying
just fix           # Auto-fix lint issues
just typecheck     # Run basedpyright

Building

just build       # Build the package
just build-docs  # Build Sphinx documentation
just serve-docs  # Build and open documentation in browser
just clean       # Remove build artifacts and caches

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

qmk_skim-0.7.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

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

qmk_skim-0.7.0-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file qmk_skim-0.7.0.tar.gz.

File metadata

  • Download URL: qmk_skim-0.7.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qmk_skim-0.7.0.tar.gz
Algorithm Hash digest
SHA256 b45c1812429da38c654ad258eb97699809c25b2286d22024de3ea827cf5b4794
MD5 5fdcbd2271acebd074816a52f01c228e
BLAKE2b-256 cfb92d3bc9fd8d6bfb0fc78f936fd76b91e623279a9e454cea63dd7c095ac7ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmk_skim-0.7.0.tar.gz:

Publisher: release.yml on Townk/skim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qmk_skim-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: qmk_skim-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qmk_skim-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36ec5f16635402c896ec0c1b332137efea7f0a7a96abbed2298e83f5fc5c4337
MD5 675a18d1757d11270837af58de3c44b2
BLAKE2b-256 9fc5db1b24910b8aa9cc5d4cf90a03dea1f45ff5916ffedb01b202a3923ed975

See more details on using hashes here.

Provenance

The following attestation bundles were made for qmk_skim-0.7.0-py3-none-any.whl:

Publisher: release.yml on Townk/skim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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