Skip to main content

PDF generation for Hieroglyph presentations.

Project description

Cascajal is a script which automates generating PDFs from Hieroglyph presentations using Firefox.

How It Works

Hieroglyph generates HTML presentations from Restructured Text documents. Sometimes, however, you need a PDF. For the conference organizer, Speaker Deck, etc. Cascajal automates generating that PDF using Firefox.

Installing

You can install Cascajal using pip:

$ pip install --user cascajal

Note that you’ll need to have the user binary directory on your PATH; see pip 2014 if you need help with that.

Cascajal doesn’t have any external Python dependencies. It does depend on Firefox (or Iceweasel, or something Firefox-like).

Generating PDFs

After you’ve installed Cascajal, you can generate a PDF of your slides.

$ make slides # this runs Hieroglyph; see the Hieroglyph docs
$ cascajal -o slides.pdf ./_build/slides/index.html

Cascajal will create a temporary Firefox profile, launch the browser, and print to a PDF. After printing completes, you can close the browser, or Cascajal will do it for you after a few seconds.

You’ll get something like https://speakerdeck.com/nyergler/in-depth-pdb as output.

Wait, but…

  • My slides aren’t rendering correctly!!

    What theme are you using? Cascajal works best with the slides2 theme in Hieroglyph. slides and single-level both have some known issues; your mileage may vary.

  • How does Cascajal find Firefox on my system?

    Poorly.

    Right now it looks in a couple of common places where it might be installed on Linux. At some point I’ll add common places for Mac OS X. I’d love it if someone using Windows helped make detection work there.

  • Why Firefox?

    Of the tools I tried, Firefox came the closest to working “out of the box”. Cascajal just tries to smooth over all the settings (documented and otherwise) that you need to set to make it work.

  • What not PhantomJS?

    Phantom currently does not support web fonts. So while it does an amazing job of generating in a headless fashion, even simple things like monospace fonts render incorrectly.

    PhantomJS 2 is currently under development, and should include improved support for web fonts. It’s not hard to imagine a Cascajal of the future that uses Phantom, and works even better.

  • How can I help?

    Try it out, let me know what doesn’t work!

    See HACKING.rst for information on how to edit the code.

  • What’s up with the name?

    According to Wikipedia,

    The Cascajal Block is a tablet-sized writing slab made of serpentinite from Mexico which has been dated to the early first millennium BCE, incised with hitherto unknown characters that may represent the earliest writing system in the New World.

    So Cascajal is a writing slab for your Hieroglyphs.

News

0.1

Release date: UNRELEASED

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cascajal-0.1.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file cascajal-0.1.tar.gz.

File metadata

  • Download URL: cascajal-0.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cascajal-0.1.tar.gz
Algorithm Hash digest
SHA256 846d6d727c89be2f730f26a3d76eb9c2b71f8b460693bcf5437c68a0957244da
MD5 5040c4e92c13033abc6d55a6fff8ffb3
BLAKE2b-256 c9d84cf71bf96951d3f63c276d3817b33a0b305d2ae15747d304b0fe4b8bf67e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page