Fix SKYbrary GUIDs, close #106
continuous-integration/drone/push Build is passing Details

This commit is contained in:
~lucidiot 2022-05-30 16:52:45 +02:00
parent 379acf872e
commit 1fcbdf9d09
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
1 changed files with 4 additions and 2 deletions

View File

@ -22,10 +22,12 @@ import "./helpers" as helpers;
"item": [
.[]
# Parse the HTML popup content to extract the link and description
| .popup |= capture("^<a href=\"(?<link>[^\"]*)\">.*</a>(?<description>.*)$")
| .popup |= capture("^<a href=\"(?<link>[^\"]*)\">.*</a>(?<description>.*)$"; "m")
# Make the URL absolute
| .popup.link |= helpers::urlresolve("https://skybrary.aero/accidents-map")
| {
"title": .label,
"link": (.popup.link | helpers::urlresolve("https://skybrary.aero/accidents-map")),
"link": .popup.link,
"description": .popup.description,
"guid": {
"@isPermaLink": "true",