29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
# Zanzibar Maritime Authority feed generator
|
|
# Expects pup JSON output holding <a> tags, outputs xmltodict-compatible JSON
|
|
# WARNING: Dates are locale-sensitive; the RSS feed might not generate correctly with another locale.
|
|
import "./helpers" as helpers;
|
|
|
|
{
|
|
"rss": {
|
|
"@version": "2.0",
|
|
"channel": {
|
|
"title": "ZMA investigation reports",
|
|
"description": "Zanzibar Maritime Authority accident investigation reports",
|
|
"link": "https://www.zma.go.tz/zma_casuality.php",
|
|
"language": "en-tz",
|
|
"pubDate": (now | strftime("%a, %d %b %Y %T %z")),
|
|
"docs": "https://www.rssboard.org/rss-specification",
|
|
"ttl": 1440,
|
|
"generator": "ITSB",
|
|
"item": [.[] | {
|
|
"title": .text,
|
|
"link": (.href | helpers::urlresolve("https://www.zma.go.tz/zma_casuality.php")),
|
|
"guid": {
|
|
"@isPermaLink": "true",
|
|
"#text": (.href | helpers::urlresolve("https://www.zma.go.tz/zma_casuality.php"))
|
|
}
|
|
}]
|
|
}
|
|
}
|
|
}
|