Skip to main content

A Python library for drawing

Project description

Drawbook

Drawbook is a Python library that helps you create illustrated children's books using PowerPoint. It leverages AI to generate beautiful watercolor-style illustrations and formats them into a cohesive and visually appealing presentation.

Features

  • AI-Generated Illustrations: Automatically create watercolor illustrations based on the text you provide.
  • Book Quickstarter: Generate an editable presentation (PowerPoint/Google Slides) that serves as a starting point - you can then change the layouts, images, and text to perfect your final design.
  • User-Friendly API: Simple and intuitive Python API for creating books with custom titles, pages, and author details.

Installation

To install Drawbook, use pip:

pip install drawbook

Usage

Here’s how you can create an illustrated book using Drawbook:

from drawbook import Book

book = Book(
    title="Mustafa's Trip To Mars",
    pages=[
        "Mustafa loves his silver cybertuck.\nOne day, his truck starts to glow, grow, and zoom up into the sky!",
        "Up, up, up goes Mustafa in his special truck.\nHe waves bye-bye to his house as it gets tiny down below.",
        "The stars look like tiny lights all around him.\nHis truck flies fast past the moon and the sun.",
        "Look! Mars is big and red like a giant ball.\nMustafa's truck lands softly on the red sand.",
        "Mustafa drives his truck on Mars and sees two small moons in the sky.\n\"This is fun!\" says Mustafa as he makes tracks in the red dirt.",
    ],
    author="Abubakar Abid"
)

book.create_presentation(output_path="Mustafas_Trip_To_Mars.pptx")

Example Output

When you run the code above, Drawbook will generate a PowerPoint file (Mustafas_Trip_To_Mars.pptx) that contains:

  • Text content formatted across multiple slides.
  • AI-generated watercolor illustrations that match the content of each page.

Customization Options

  • Title Page: Customize the book’s cover with a unique title and author name.
  • Illustration Styles: Choose between different AI styles for varied illustration aesthetics (coming soon).
  • Slide Layouts: Configure the layout of text and images within the slides.

Contributing

Contributions to Drawbook are welcome! If you have ideas for new features or improvements, feel free to submit an issue or pull request on the GitHub repository.

License

Drawbook is open-source software licensed under the MIT License.

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

drawbook-0.1.0.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

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

drawbook-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drawbook-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for drawbook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f40316dad99b0a3b6f4585a3cf52f62ce2989ed8fd013cabf693c1ea95045deb
MD5 ba1666bf316d027f18100125e03875d9
BLAKE2b-256 48acc91cb1bbbb2980a2cf20b6c61a80b7b2b2228214682f5d016663bd9b73cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: drawbook-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for drawbook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fef1156866508431e7397f3078cd55756009d71b8e64596904c1c718de95aece
MD5 b672b6778c388f099c1357604706e72d
BLAKE2b-256 a6ffe17b83b3b2700c3c589e1b0dc45bab4754465c9ce81c0eb7905fbca7b4f1

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