Skip to main content

Puzzle reconstruction experiments and CLI tooling.

Project description

Puzzletree

documentation pypi version Puzzle reconstruction experiments and CLI tooling.

Installation

pip install puzzletree

With uv:

uv tool install puzzletree

Reconstruct Demo

The reconstruct command expects a directory of equally sized tile images. The images in tests/test_data are full reference images, so the quickest demo flow is:

  1. Split one of the bundled images into tiles.
  2. Run puzzletree reconstruct on that tile directory.

This example uses tests/test_data/city.jpg and writes tiles into the current directory:

uv run python -m puzzletree tile \
  --input-image tests/test_data/city.jpg

This uses the default 4x5 grid and writes PNG tiles to ./puzzletree-city-tiles.

Then run the CLI from a source checkout:

uv run python -m puzzletree reconstruct \
  --input-dir ./puzzletree-city-tiles \
  --animation ./puzzletree-city-tree-build.gif

This writes the reconstructed image to ./puzzletree-city-reconstructed.png and, when --animation is set, saves animation frames to ./puzzletree-city-frames.

Tree build animation

If you installed the package globally, the same command works without uv run:

puzzletree tile --input-image tests/test_data/city.jpg
puzzletree reconstruct --input-dir ./puzzletree-city-tiles

Other bundled demo images:

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

puzzletree-0.1.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

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

puzzletree-0.1.0-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file puzzletree-0.1.0.tar.gz.

File metadata

  • Download URL: puzzletree-0.1.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for puzzletree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 545f742cea65a7c19470a448bf8ab4f2056e221cdc19df07d27042939710ee3f
MD5 f08853200bdee01520e9a31fc0cf6fb8
BLAKE2b-256 190f3f8563c231a86b639956aaebcd5a9dde6b72460e28121ac0398bbc001648

See more details on using hashes here.

File details

Details for the file puzzletree-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: puzzletree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.10

File hashes

Hashes for puzzletree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfb0b802822b8a95ea1419c1a9936533e13ebdba96dd088a84f9aa28d35175b5
MD5 c69bf31ded6af265ba6dbb023667cf4a
BLAKE2b-256 4361e61feaf27b6626afe0ab0c76ee0e981134991772b5848295d02f1df855d8

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