itsb/jq/aac.jq

28 lines
1.0 KiB
Plaintext

# AAC feed generator
# Expects pup JSON output holding <tr> tags, outputs xmltodict-compatible JSON
# WARNING: Dates are locale-sensitive; the RSS feed might not generate correctly with another locale.
{
"rss": {
"@version": "2.0",
"channel": {
"title": "AAC",
"description": "El Salvador's Autordid de Aviación Civil",
"link": "https://www.aac.gob.sv/informes-de-accidentes/",
"language": "es-SV",
"pubDate": (now | strftime("%a, %d %b %Y %T %z")),
"docs": "https://www.rssboard.org/rss-specification",
"ttl": 1440,
"generator": "ITSB",
"item": [
.[].children | {
"title": .[0].children[0].text,
"link": .[-1].children[2].children[0].children[0].children[0].src,
"description": .[1].children[0].text,
"pubDate": (.[2]["data-order"] | tonumber | gmtime | mktime | strftime("%a, %d %b %Y %T %z"))
}
]
}
}
}