Skip to main content

Package defined to create jigsaw puzzle cut templates, and digital puzzle sets.

Project description

This Python package provides functionality to generate jigsaw puzzle cut templates and digital puzzle sets. It includes functions for creating jigsaw templates, applying cuts, and generating SVG representations.

Pre-requisites

  • Python >= 3.8

Installation

You can install the package using pip:

pip install pyjigsaw

Usage

from pyjigsaw import jigsawfactory

# Create a jigsaw cut template
mycut = jigsawfactory.Cut(5, 4, image="./Zugpsitze_mountain.jpg", use_image=True)

# Generate a jigsaw set from the cut template
myjig = jigsawfactory.Jigsaw(mycut, "Zugpsitze_mountain.jpg")
myjig.generate_svg_jigsaw("./Pieces")

Features

Cut Class

The Cut class is responsible for creating jigsaw cut templates. It takes parameters such as the number of pieces in height and width, absolute height and width, an optional image for deriving dimensions, and stroke/fill color specifications.

from pyjigsaw import jigsawfactory


# Create a jigsaw cut template
mycut = jigsawfactory.Cut(5, 4, image="./Zugpsitze_mountain.jpg", use_image=True)

Jigsaw Class

The Jigsaw class uses a Cut template to generate a set of jigsaw pieces in SVG format. It takes a Cut object and an image file path. The generated SVG files are saved in the specified output directory.

from pyjigsaw import jigsawfactory

# Create a jigsaw set from the cut template
myjig = jigsawfactory.Jigsaw(mycut, "Zugpsitze_mountain.jpg")
myjig.generate_svg_jigsaw("./Pieces")

Contributing

Feel free to contribute to the project by opening issues or submitting pull requests on GitHub. License

This project is licensed under the MIT License - see the LICENSE file for details.

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

pyjigsaw-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

pyjigsaw-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjigsaw-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pyjigsaw-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d528cd1a95c4e30d8c590f12e2d8f77dfa636600971b7963399625bd386bd34
MD5 83ffa92f7ad8005d492ecb94c2c69f76
BLAKE2b-256 9619a3c0a3403742eaa081feb0be6ef0c6b744324150d9658ab7c76735bd9267

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjigsaw-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pyjigsaw-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 858d61a151f3f717342d295d49908dd9efa0b2599eb886271f95fa0a8eb72732
MD5 322cfc6bb023547ebbef7e2a8c727d24
BLAKE2b-256 cfa2982b61faa0994336aeb13768627fd7f44bbf99cdbce3c8760d413f2084d1

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