Compare commits

...

6 Commits

8 changed files with 268 additions and 3 deletions

View File

@ -2005,6 +2005,20 @@ because astronomers need coffee to go through the night -->
</nhc:Cyclone>
</item>
<item>
<title>p1k3</title>
<pubDate>Sun, 19 Nov 2023 17:56:05 +0100</pubDate>
<guid isPermaLink="false">p1k3</guid>
<category domain="https://envs.net/~lucidiot/rsrsss/">Feed</category>
<link>https://p1k3.com/feed</link>
<description><![CDATA[
<p>~brennen is a fellow <a href="https://tilde.town" target="_blank">townie</a> who plays the long game. His blog exists since 1997, and although the posting frequency has lowered, it is still active today. Look at <a href="https://p1k3.com/all/" target="_blank">the archive</a> and be amazed.</p>
<p>In the middle of an IRC conversation, I mentioned how I was only reading the blog articles of my friends that I spot in my feedreader, right after mentioning I read 40 of brennen's posts. He proceeded to build an Atom feed with every single post from his website all the way to November of 2020, which is as of writing still available <a href="https://p1k3.com/all.xml" target="_blank">here</a>. If you want to stress test your feedreader, or how much you like to read blog posts, add this feed. Don't expect it to be updated though since it was generated manually just once.</p>
<p>I went through every single of the 1960 entries of this special feed in just one month, and I read the other few dozen posts that were posted in the years since. It was really fun to follow along as ~brennen grows up. He told me he thought the older entries were embarrassing, and I can understand that since I also feel shame at things I put up online when I was younger, most of which I have deleted ever since. But going through all of his posts was fascinating. I wasn't laughing at young him or thinking any less of present him. I was just watching someone growing up a decade earlier than me, in a different country, with a different culture. I believe there is some great historical value in this online diary, just like how historians are studying the past by reading diaries. I hope ~brennen carries on with this great undertaking and continues shoving random tidbits of his life into this website. This is the World Wide Web at its finest: humans just being human.</p>
]]></description>
</item>
</channel>
<access:restriction relationship="allow" />
</rss>

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

BIN
img/sprites/bullet-red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

38
xquery/opml/alert-hub.xqy Normal file
View File

@ -0,0 +1,38 @@
<opml version="2.0">
<head>
<title>Alert-Hub.org CAP alert 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>
<outline text="Sources">
{
json(fn:unparsed-text("https://alert-hub-sources.s3.amazonaws.com/json"))/sources/source
! <outline
type="rss"
xml:id="{sourceId}"
text="{byLanguage/name[1]}"
xmlUrl="{capAlertFeed}"
htmlUrl="{registerUrl}"
/>
}
</outline>
<outline text="Generated feeds">
{
json(fn:unparsed-text("https://alert-hub-subscriptions.s3.amazonaws.com/json"))//subscriptions/subscription
! <outline
type="rss"
xml:id="{subscriptionId}"
text="{subscriptionName}"
title="{subscriptionName}"
xmlUrl="{subscriptionUrl}"
version="RSS"
description="{fn:parse-xml(feedRssXml)/rss/channel/description}"
/>
}
</outline>
</body>
</opml>

View File

@ -29,10 +29,10 @@ doc("https://feeds.enviroflash.info/")//*[contains(@class, "formrow")]//tr/
))/raw)/cityBody) ! (
(: Ignore states where there are no feeds listed at all :)
if (exists(//tr[td[not(@colspan)][@id='name']])) then
<outline type="text" text="{$stateCode}">
<outline text="{$stateCode}">
{
//tr[td[not(@colspan)][@id='name']]
! <outline type="text" text="{td[@id='name']/text()}">
! <outline text="{td[@id='name']/text()}">
{
.//a[ends-with(@href, ".xml")]
! (

View File

@ -0,0 +1,26 @@
<opml version="2.0">
<head>
<title>MeteoAlarm 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>
{
doc('https://feeds.meteoalarm.org/')//h2
! <outline text="{text()}">
{
./following-sibling::ul[1]/li/a/@href
! <outline
type="rss"
xmlUrl="{.}"
text="{if (contains(., 'atom')) then 'Atom + CAP' else 'RSS'}"
version="{if (contains(., 'atom')) then 'ATOM' else 'RSS'}"
/>
}
</outline>
}
</body>
</opml>

96
xsd/servicestatus.xsd Normal file
View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Service Status RDF Site Summary 1.0 Module schema
Copyright (c) 2023 ~lucidiot
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<xs:schema
targetNamespace="http://purl.org/rss/1.0/modules/servicestatus/"
version="1.0"
elementFormDefault="qualified"
xmlns="http://purl.org/rss/1.0/modules/servicestatus/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:annotation>
<xs:documentation>
Schema for the Service Status RDF Site Summary 1.0 Module, Draft 4 (2002-06-07).
</xs:documentation>
<xs:documentation>
<![CDATA[Derived from the online documentation at <https://web.resource.org/rss/1.0/modules/servicestatus/>.]]>
</xs:documentation>
</xs:annotation>
<xs:simpleType name="Percentage">
<xs:annotation>
<xs:documentation>An integer representing a percentage, from 0 to 100.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="100" />
</xs:restriction>
</xs:simpleType>
<xs:element name="aboutStats" type="rdf:resource">
<xs:annotation>
<xs:documentation>Resource describing how the availability percentage and average response time are calculated.</xs:documentation>
<xs:documentation>This should be added to the channel element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="availability" type="Percentage">
<xs:annotation>
<xs:documentation>A percentage representing the availability of the service. How this is calculated is left up to the service, and should be described by the `aboutStats` resource.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="averageResponseTime" type="xs:decimal">
<xs:annotation>
<xs:documentation>The average response time of the service, in seconds. How this is calculated is left up to the service, and should be described by the `aboutStats` resource.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="lastChecked" type="xs:datetime">
<xs:annotation>
<xs:documentation>The most recent time that the service was checked, no matter how the service responded.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="lastSeen" type="xs:datetime">
<xs:annotation>
<xs:documentation>The most recent time that the service has successfully responded.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="responding" type="xs:boolean">
<xs:annotation>
<xs:documentation>Whether or not the service is currently responding.</xs:documentation>
<xs:documentation>When this is true, the `lastChecked` and `lastSeen` datetimes should be equal.</xs:documentation>
<xs:documentation>When this is false, the difference between the `lastChecked` and `lastSeen` datetimes may be used to get an approximation of how long the service has been unavailable.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="statusMessage" type="xs:string">
<xs:annotation>
<xs:documentation>A message providing further details about the service's status.</xs:documentation>
<xs:documentation>This may be useful to report progress on fixing an issue with the service, or warning about scheduled outages.</xs:documentation>
<xs:documentation>This may be used regardless of whether or not the service is responding.</xs:documentation>
<xs:documentation>This should be added to an item element.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>

View File

@ -14,6 +14,7 @@
xmlns:nhc="https://www.nhc.noaa.gov"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:ss="http://purl.org/rss/1.0/modules/servicestatus/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:webfeeds="http://webfeeds.org/rss/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -22,6 +23,7 @@
http://postneo.com/icbm ../xsd/icbm.xsd
http://geourl.org/rss/module/ ../xsd/geourl.xsd
https://www.nhc.noaa.gov ../xsd/nhc.xsd
http://purl.org/rss/1.0/modules/servicestatus/ ../xsd/servicestatus.xsd
"
>
<xsl:output method="html" doctype-system="about:legacy-compat" />
@ -94,7 +96,7 @@
</header>
<!-- TODO: include Dublin Core stuff -->
<xsl:if test="textInput or pubDate or lastBuildDate or language or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude) or category or rating or generator or admin:generatorAgent or copyright or cc:license or creativeCommons:license or managingEditor or webMaster or admin:errorReportsTo or /rss/access:restriction or /rss/@idx:index or ttl or skipDays/day or skipHours/hour or sy:updatePeriod or sy:updateFrequency or sy:updateBase or cloud or blogChannel:blogRoll or blogChannel:blink or blogChannel:mySubscriptions">
<xsl:if test="textInput or pubDate or lastBuildDate or language or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude) or category or rating or generator or admin:generatorAgent or copyright or cc:license or creativeCommons:license or managingEditor or webMaster or admin:errorReportsTo or /rss/access:restriction or /rss/@idx:index or ttl or skipDays/day or skipHours/hour or sy:updatePeriod or sy:updateFrequency or sy:updateBase or cloud or ss:aboutStats or blogChannel:blogRoll or blogChannel:blink or blogChannel:mySubscriptions">
<section>
<xsl:if test="textInput">
<form action="{textInput/link}" class="textinput">
@ -433,6 +435,15 @@
</dd>
</xsl:if>
<xsl:if test="ss:aboutStats">
<dt><a href="https://web.resource.org/rss/1.0/modules/servicestatus/" target="_blank">mod_servicestatus</a> statistics description</dt>
<dd>
<a href="{ss:aboutStats}" target="_blank">
<xsl:value-of select="ss:aboutStats" />
</a>
</dd>
</xsl:if>
<xsl:if test="blogChannel:blogRoll">
<dt>Blogroll (OPML)</dt>
<dd>
@ -543,6 +554,86 @@
<xsl:apply-templates select="nhc:Cyclone" />
<xsl:if test="ss:responding or ss:lastChecked or ss:lastSeen or ss:availability or ss:averageResponseTime or ss:statusMessage">
<hr />
<details>
<summary>
<xsl:choose>
<xsl:when test="ss:responding/text() = 'true' or ss:responding/text() = '1'">
<span class="icon-bullet-green" alt="Service is responding" />
</xsl:when>
<xsl:when test="ss:responding/text() = 'false' or ss:responding/text() = '0'">
<span class="icon-bullet-red" alt="Service not responding" />
</xsl:when>
</xsl:choose>
<xsl:text>Service status</xsl:text>
</summary>
<dl>
<xsl:if test="ss:responding">
<dt>Last check result</dt>
<dd>
<xsl:choose>
<xsl:when test="ss:responding/text() = 'true' or ss:responding/text() = '1'">
<xsl:text>Service is responding</xsl:text>
</xsl:when>
<xsl:when test="ss:responding/text() = 'false' or ss:responding/text() = '0'">
<xsl:text>Service is not responding</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Unknown value: </xsl:text>
<xsl:value-of select="ss:responding" />
</xsl:otherwise>
</xsl:choose>
</dd>
</xsl:if>
<xsl:if test="ss:lastChecked">
<dt>Last check time</dt>
<dd>
<time>
<xsl:value-of select="ss:lastChecked" />
</time>
</dd>
</xsl:if>
<xsl:if test="ss:lastSeen">
<dt>Last successful check</dt>
<dd>
<time>
<xsl:value-of select="ss:lastSeen" />
</time>
</dd>
</xsl:if>
<xsl:if test="ss:availability">
<dt>Availability</dt>
<dd>
<xsl:value-of select="ss:availability" />
<xsl:text>%</xsl:text>
</dd>
</xsl:if>
<xsl:if test="ss:averageResponseTime">
<dt>Average response time</dt>
<dd>
<time datetime="PT{ss:averageResponseTime}S">
<xsl:value-of select="ss:averageResponseTime" />
<xsl:text> seconds</xsl:text>
</time>
</dd>
</xsl:if>
<xsl:if test="ss:statusMessage">
<dt>Status message</dt>
<dd>
<xsl:value-of select="ss:statusMessage" />
</dd>
</xsl:if>
</dl>
</details>
</xsl:if>
<xsl:if test="category or guid or source or author or comments or slash:comments or (icbm:latitude and icbm:longitude) or (geo:lat and geo:long) or (geourl:latitude and geourl:longitude)">
<footer>
<p>