Lately I have noticed that when you purchase a ticket you don’t get a static PDF/PNG anymore.

Increasingly often, you get a .pkpass file, which is supposed to be opened in wallet apps (like Google Wallet or any 3rd-party wallet app).

Since I don’t like to share information about the events I attend with strangers on the Internet, I have decided to take a closer look at these .pkpass files.

They are just zip files that contain a background image, an icon and a pass.json with the actual information about the ticket. Nothing that can’t be handled by a script rather than a 3rd-party 100 MB mobile app.

I have thus put together a simple #shell script that does exactly that.

Dependencies:

  • jq
  • zint
  • magick
  • unzip
  • curl or wget

gist.manganiello.tech/fabio/pk…

Usage:

pkpass2png <a href="https://domain.tld/myticket.pkpass" rel="ugc">https://domain.tld/myticket.pkpass</a> ticket.png
This entry was edited (3 weeks ago)
in reply to Fabio Manganiello

thank you, I can finally cross one of my old side project TODO items off my list 💖

I used to travel a ton in the before times and were always pissed at the corpos pushing you into downloading their apps (or any app, really) when this could be a 1, PNG or 2, a PWA that unpacks the pkpass and displays it with the metadata for you (gating the interactive features that use an external API behind a mail client-style "load external data" confirm dialog)

in reply to Flaki

@flaki@/flaki.social Oooh! The best place to get started on this would probably be Mozilla Connect, our site for suggestions and ideas! (connect.mozilla.org ) Our community can upvote/support and our developers can take a look at implementation details in more detail.