Build OPML for Chicago Transit Authority feeds
This commit is contained in:
parent
c3ae653194
commit
8921e100fa
|
@ -1,4 +1,5 @@
|
||||||
opml/feeds.opml
|
opml/feeds.opml
|
||||||
opml/nhc.opml
|
opml/nhc.opml
|
||||||
|
opml/cta.opml
|
||||||
css/sprites.css
|
css/sprites.css
|
||||||
img/sprites.png
|
img/sprites.png
|
||||||
|
|
6
Makefile
6
Makefile
|
@ -1,5 +1,5 @@
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: css/sprites.css opml/feeds.opml opml/nhc.opml
|
all: css/sprites.css opml/feeds.opml opml/nhc.opml opml/cta.opml
|
||||||
|
|
||||||
opml/feeds.opml: feed.xml xquery/feeds_opml.xqy
|
opml/feeds.opml: feed.xml xquery/feeds_opml.xqy
|
||||||
xidel --silent feed.xml --extract-kind=xquery3 --extract-file=xquery/feeds_opml.xqy --output-format=xml > $@
|
xidel --silent feed.xml --extract-kind=xquery3 --extract-file=xquery/feeds_opml.xqy --output-format=xml > $@
|
||||||
|
@ -9,6 +9,10 @@ opml/nhc.opml: bin/build_nhc_opml xquery/nhc_opml.xqy
|
||||||
bin/build_nhc_opml > $@
|
bin/build_nhc_opml > $@
|
||||||
chmod a+r $@
|
chmod a+r $@
|
||||||
|
|
||||||
|
opml/cta.opml: xquery/cta_opml.xqy
|
||||||
|
xidel --silent --extract-kind=xquery3 --extract-file=xquery/cta_opml.xqy --output-format=xml > $@
|
||||||
|
chmod a+r $@
|
||||||
|
|
||||||
sprites := $(wildcard img/sprites/*.png)
|
sprites := $(wildcard img/sprites/*.png)
|
||||||
|
|
||||||
img/sprites.png: $(sprites)
|
img/sprites.png: $(sprites)
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<opml version="2.0">
|
||||||
|
<head>
|
||||||
|
<title>Chicago Transit Authority RSS feeds</title>
|
||||||
|
<dateModified>{format-dateTime(adjust-dateTime-to-timezone(current-dateTime(), xs:dayTimeDuration("PT0S")), "[FNn,*-3], [D01] [MNn,*-3] [Y0001] [H01]:[m01]:[s01] GMT")}</dateModified>
|
||||||
|
<ownerName>lucidiot</ownerName>
|
||||||
|
<ownerEmail>lucidiot@envs.net</ownerEmail>
|
||||||
|
<ownerId>https://tilde.town/~lucidiot/contact.html</ownerId>
|
||||||
|
<docs>http://dev.opml.org/spec2.html</docs>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{
|
||||||
|
(: Open the CTA RSS feeds page and grab the list items. :)
|
||||||
|
x:parse-html(x:request('https://www.transitchicago.com/rss/default.aspx')/raw)//ul[@class="rsslist"]/li
|
||||||
|
! <outline text="{substring-after(a/normalize-space(text()), 'All ')}">
|
||||||
|
{
|
||||||
|
(., ul/li)
|
||||||
|
! <outline
|
||||||
|
type="rss"
|
||||||
|
version="RSS"
|
||||||
|
text="{a/normalize-space(text())}"
|
||||||
|
xmlUrl="{resolve-uri(a/@href, 'https://www.transitchicago.com/rss/default.aspx')}"
|
||||||
|
language="en-us"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
</outline>
|
||||||
|
}
|
||||||
|
</body>
|
||||||
|
</opml>
|
Loading…
Reference in New Issue