Skip to content

Importing images / scanning from webcam to parse QR codes and IATA BcBp (barcode boarding passes) #88

Description

@nekohayo

In my few minutes of playing around with "Passes" (latest version from flathub) on GNOME, I only saw the ability to import .pkpass files (presumably), but nothing to scan a physical boarding pass with barcodes/QR codes... also, that welcome screen's "Import a pass…" button gives you no indication whatsoever as to what actually constitutes supported methods or supported formats (it only throws you in front of a file picker):

Screenshot

User story / scope

In SeineEloquenz/fosswallet#367 (for the FossWallet app on F-Droid), @git-ari and @future-figs explained the problem quite well. Quoting some parts of their usecase, which is the same as mine:

[…] [import] both the barcode/QR code as well as the information like source and destination airport, seat, date, even passenger name. […]

[…] In my experience, few ticketing agencies (flights, trains, buses, concerts) offer PKPASS files; it's usually just a static QR code attached to an email or on a webpage. […]

Implementation hints

In that same ticket, @soshial provided a very insightful piece of information regarding how standardized this is:

[…] I have looked it up and it turns out, that there a standard that specifies exact way how flight ticket data is encoded in those QR codes. All fields and their order are documented in IATA Resolution 792, commonly known as BCBP (Bar Coded Boarding Pass).

FossWallet implemented it through these two merge requests:

However, from a GNOME technology stack perspective, maybe you would want to look at how Authenticator, Decoder and Warp handle the camera (through PipeWire and portals, presumably) for QR code scanning on the FreeDesktop / Linux mobile.

Authenticator also handles importing QR codes from an existing image file from the filesystem (or by taking a screenshot), not just with a webcam, so that part would also be useful for the frequent "I received a PDF boarding pass in an email or on a web page" situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions