Initial commit: boarding pass to AirTrail pipeline

Photograph/screenshot a boarding pass, decode its BCBP barcode (PDF417/
Aztec/QR/DataMatrix), fetch the historical flight track from FlightAware
the day after the flight, stage it for review, and write it into AirTrail
via its REST API on approval. ntfy notifications carry signed
Approve/Deny/Investigate actions.
This commit is contained in:
2026-07-04 22:21:02 +10:00
commit 408fde440d
34 changed files with 11657 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
(function () {
var root = document.documentElement;
var toggle = document.getElementById("theme-toggle");
if (toggle) {
toggle.addEventListener("click", function () {
var isLight = root.classList.contains("light");
root.classList.remove("light", "dark");
var next = isLight ? "dark" : "light";
root.classList.add(next);
localStorage.setItem("theme", next);
});
}
var mapEl = document.getElementById("track-map");
if (mapEl && window.L) {
var coords = JSON.parse(mapEl.dataset.track || "[]");
// KML/GeoJSON order is [lon, lat, elev?]; Leaflet wants [lat, lon].
var latLngs = coords.map(function (c) { return [c[1], c[0]]; });
if (latLngs.length) {
var map = L.map(mapEl);
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "© OpenStreetMap contributors",
maxZoom: 18,
}).addTo(map);
var line = L.polyline(latLngs, { color: "#3b82f6", weight: 3 }).addTo(map);
map.fitBounds(line.getBounds(), { padding: [20, 20] });
L.marker(latLngs[0]).addTo(map);
L.marker(latLngs[latLngs.length - 1]).addTo(map);
}
}
})();