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.1.tar.gz (6.3 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.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjigsaw-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 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.1.tar.gz
Algorithm Hash digest
SHA256 20a97847a9986f7681f145a5de018b50a28f935f485fbe0e06156dd140ad6e41
MD5 b48ad0d3fb5083674241d28990a6faa0
BLAKE2b-256 3686c5ce4ca74afaa4a3c2b45d10e133df60a6177037bc55e0837441c5c9244e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjigsaw-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d25b080eca8039820b91112b9df810064cb5322117c7432abb59e091352fe0d5
MD5 6254ee59cc4e0acc7c4db0e91d0b4c8f
BLAKE2b-256 55af0075d059a9d379ea368ab0a2f0c62420bcd6be839d9a7d0ad68ce523e602

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