Skip to content

Instantly share code, notes, and snippets.

View gloriousDan's full-sized avatar

Daniel gloriousDan

  • Augsburg University
View GitHub Profile
@gloriousDan
gloriousDan / README.md
Last active March 20, 2023 22:50
PDF concat with section rewrites

Concat PDFs

This script concatenates PDFs and preseverses their sections (like pdftk normally does)

Additionally it writes the current pdf's title (or file name if it doesn't have a title) as a section on the start page of the pdf in the merged pdf.

All other sections are then moved down a level to preserve the section hierarchy within the document

@gloriousDan
gloriousDan / 01-avv-departure-list.md
Last active February 8, 2022 16:22
AVV departure list

AVV departure list

This is a simple static html site. It uses javascript to request departures of the AVV public transport service in Augsburg. It uses the same calls as the official frontend hosted at https://efa.avv-augsburg.de/avv/XSLT_TRIP_REQUEST2.

The main request (to get departure data) is a POST request to https://efa.avv-augsburg.de/avv/XSLT_DM_REQUEST. Since this endpoint doesn't have the access-control-allow-origin: * set, it is proxied through one of my servers. In addition to proxying I set the following headers:

  • access-control-allow-origin: * This could also be set to only allow the origin where this html file is hosted