Skip to main content

Transcript generator for Dinosaur Comics

Project description

Dinosaur Comic Parser

A transcript generator for Ryan North's Dinosaur Comics

Installation

Install parse-qwantz with pip

  pip install parse-qwantz

Usage

You need to download the image file for the comic you want transcribed, for example https://qwantz.com/comics/comic2-02.png. Then run parse-qwantz:

$ parse-qwantz comic2-02.png
T-Rex: Today is a beautiful day to be stomping on things! As a dinosaur, stomping is the best part of my day indeed!

T-Rex: *gasp*

T-Rex: What's that, little house? You wish you were back in your own time? THAT IS TOO BAD FOR YOU

T-Rex: Perhaps you too will get a stomping, little girl!
Utahraptor: WAIT!

Utahraptor: Is stomping really the answer to your problem(s)?
T-Rex: Problem(s)?

T-Rex: My only problem(s) have to do with you interrupting my stomping!
T-Rex: 〚small〛 crazy utahraptor!

You can also call it with

python -m parse_qwantz

The argument can also be a directory path instead of a file path. In such case the program will run on all files in the specified directory.

Options

--output-dir

By default, the program outputs to stdout and logs to stderr. With this option, when processing file image_name.png it will output to OUTPUT_DIR/image_name.png.txt and log to OUTPUT_DIR/image_name.log.

--generate-svg

Instead of transcribing the comic, generate a vectorized version in the SVG format and print it to the standard output.

--parse-footer

Instead of transcribing the comic, transcribe just the footer.

Conventions

Bold and italics are marked with "◖◗" and "▹◃" respectively. This is to avoid ambiguity which may result from using characters like "*" or "_".

All descriptions are in "〚〛" brackets. Each line that isn't just description starts from a "character" name followed by a colon. That "character" might be one of the actual characters, but also "Narrator", "Off panel", "Banner", "Book cover" etc.

When some text in a panel is obscured but can be reconstructed, it's in "⦃⦄" braces. So far this applies only to 2 comics: #59 and #61.

When some text in a panel is obscured and not reconstructed, it's replaced either by the special "…" character, or a description of how it's obscured in "〚〛" brackets.

Notes

This program still does not work on all DC strips, but at this point it should work correctly on pretty much all "standard" strips and some less-standard ones (thanks to the system of overrides). Eventually all existing strips should work, including the guest comics, with updates for new comics coming out regularly.

After all comics are working, I might add some other features, like generating SVG images.

Running Tests

To run tests, run the following command:

  pytest test/

Acknowledgments

This program would not be possible without the wonderful comics by Ryan North! Thanks, Ryan, and congratulations on the 20th anniversary of your comics! Btw the anniversary comic will totally not work with this script, haha! (at least until I add an override)

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

parse_qwantz-2025.1.1.tar.gz (492.1 kB view details)

Uploaded Source

Built Distribution

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

parse_qwantz-2025.1.1-py3-none-any.whl (503.7 kB view details)

Uploaded Python 3

File details

Details for the file parse_qwantz-2025.1.1.tar.gz.

File metadata

  • Download URL: parse_qwantz-2025.1.1.tar.gz
  • Upload date:
  • Size: 492.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for parse_qwantz-2025.1.1.tar.gz
Algorithm Hash digest
SHA256 cb483fc18c5d8d6cf78482b50b1d0fa0f87ced0e3da8c4ff4600f2e01535b8ef
MD5 9d1214747848ab80ab1ae30d80c9604d
BLAKE2b-256 1028079eb3f62e73055c6a0dbcd1207c06867162f97ee435628c0d059812de12

See more details on using hashes here.

File details

Details for the file parse_qwantz-2025.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for parse_qwantz-2025.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58f1b14560bf873452c5fb0859d8de0225a8d22f0b9a87084be3232de9333964
MD5 b236f11f9cfeedca3ecbd4be3efa017b
BLAKE2b-256 ade310ed97e16e170203b3234993a5956af78b911b5eb3f01f9d12cf565007f8

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