| Name | Size |
|---|---|
| .gitignore | 26B |
| LICENSE | 1072B |
| Makefile | 383B |
| README.md | 734B |
| db_pkpass.py | 9802B |
| requirements.txt | 38B |
| tests.py | 25060B |
Convert Deutsche Bahn PDF tickets to PKPass
Usage
$ python3 -m venv .venv
$ . .venv/bin/activate
$ python3 -m pip install -r requirements.txt
$ python3 db_pkpass.py /path/to/my/ticket.pdf
You can also make manual adjustments before packing the pkpass file:
$ python3 db_pkpass.py /path/to/my/ticket.pdf --debug > ticket.json
$ $EDITOR ticket.json
$ python3 db_pkpass.py ticket.json
Limitations
- The PKPass file does not contain a signature, so it will not work with Apple Wallet
- The code has not been extensively tested yet. There will still be many issues with different tickets or wallets.
Prior Art
For a much more comprehensive solution, see https://github.com/TheEnbyperor/zuegli