Skip to main content

Convert an image into a bookfolding pattern

Project description

Create Your Own Bookfolding Patterns

This tool allows you to generate bookfolding patters from images.

Each color of pixels in the image must correspond to one fold depth in the scuplture, with each horizontal pixel corresponding to one sheet of paper in the book and each vertical pixel to one "measurement interval" along the edge of the book.

If you use a traditional ruler, this measurement interval can be e.g. 1.0 mm, corresponding to the spacing between the markings in the ruler, or if you feel you can comfortably eyeball the midpoint between two markings, you can use 0.5 mm instead. For special tools, such as Incra rulers, the interval can be even shorter.

If your pattern has less sheets than your book has pages, or the book you use has pages without numbers, you can also set a custom start page for the pattern, so that the first sheet in the pattern is e.g. page 5 or "page -3".

Example

To create a pattern, you need a two-color image. The dimensions of the image must be compatible with the book you intend to use: each horizontal pixel corresponds to one sheet of paper in the book you are folding. You must also ensure that the image is not too high for your book. In this example, we will use examples/hearts-342x315.png).

The image is 342 pixels wide, so we'll need a book with at least 648 pages. Let's assume that the book we intend to fold has 700 pages, meaning that there will be a total of 8 sheets of paper in the book that do not belong to the pattern. We want to divide them evenly so that the pattern sits in the middle of the book, thus starting the pattern after the fourth sheet of paper in the book. Thus, given that the book does not have unnumbered pages, the pattern will start at page number 8.

Let's also assume that we are able to make the folds at 0.5 mm precision, meaning that each vertical pixel in the pattern corresponds to 0.5 mm along the edge of the book. This means that the height of the pattern along the edge of the book is 15.75 cm, which fits nicely in our imaginary book that is 16 cm high.

With this information, the pattern can be created using the command

bookfolder-cli --measurement-interval 0.5 --start-page 8 examples/hearts-342x315.png pdf-pattern examples/hearts.pdf

or by providing the corresponding information to the grapical version of the program. The resulting pattern can be found in examples/hearts.pdf.

Requirements

This software has been tested on Python 3.6, but will likely run on other versions of Python 3 too. If you use the graphical user interface, you also need to have python3-tkinter installed.

Installation

pip install bookfolder

Usage

Windowed mode

After installing, you can start the program with command bookfolder.

Command-line use

See bookfolder-cli --help for information about available commands and their invocation.

License

This software is licensed under GNU General Public License v3.0.

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

bookfolder-0.5.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

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

bookfolder-0.5-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file bookfolder-0.5.tar.gz.

File metadata

  • Download URL: bookfolder-0.5.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.6.9

File hashes

Hashes for bookfolder-0.5.tar.gz
Algorithm Hash digest
SHA256 ce0aea563a9f8c3af27d1e3b8b8366cdaeaffc03e1b97c1d6ad0becc724a29bf
MD5 2ee541b8fa0f4ce94d9999c1cd5f91b8
BLAKE2b-256 eb8c59a9928ed06761e593c5098f62ced7fd5a1ed26c8ab55420958599a857fb

See more details on using hashes here.

File details

Details for the file bookfolder-0.5-py3-none-any.whl.

File metadata

  • Download URL: bookfolder-0.5-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.6.9

File hashes

Hashes for bookfolder-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bc55e94cc19ea57496b5fb6f9ed0378dc49d1d6e90b81b286784c00a859e9d12
MD5 d07bb92b20097ee7cd9f4227931c0ee1
BLAKE2b-256 22b18c7cd444794478100f87897a448cf44d12f2dc119b64681b9ff2c5714a9c

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