Avainsanana Tiny Tiny RSS

”terminology-tooltip” span elements break content in Atom feed

3. lokakuuta 2024 klo 16.35
Sijainti: Vianhallintajärjestelmät: Github
Avainsanat: Home Assistant, Tiny Tiny RSS

A tooltip is used to render explanations for terminology when site content is viewed directly in a browser. But feed readers traditionally don’t support styles, and so the content is broken up by the <span class='terminology-tooltip'> elements’ content being shown mid-sentence. For instance, this paragraph in the 2024.10 release post

<p>We also introduce some small YAML automation syntax changes. If you are still a sucker for writing your automations
in <span class='terminology'>YAML<span class='terminology-tooltip'>YAML is a human-readable data serialization
language. It is used to store and transmit data in a structured format. In Home Assistant, YAML is used for configuration,
for example in the <code>configuration.yaml</code> or <code>automations.yaml</code>
files.<a class='terminology-link' href='/docs/configuration/yaml/'> [Learn more]</a></span></span> (like me), I’m sure
you’ll love these little tweaks that make it all feel more natural.</p>

is shown in my feed reader (Tiny Tiny RSS) as:

Screenshot from 2024-10-03 16-23-50

I’m not sure if this is a recent technical change, or just the first instance of these spans being used, or if I just haven’t been reading the posts that thoroughly, but the 2024.10 release post was the first I noticed this.

Vastaa viestiin sen kontekstissa (Github)

How about a hook for filtering $articles in FeedParser?

6. kesäkuuta 2014 klo 10.54
Sijainti: Keskustelupalstat: Tiny Tiny RSS Community Forums
Avainsanat: Tiny Tiny RSS

I used to get so many old videos as reruns from Youtube feeds that I got fed up with it and made these changes to init() in classes/feedparser.php (added lines prefixed with ’+’):

foreach ($articles as $article) {
+    $ju_article = new FeedItem_Atom($article, $this->doc, $this->xpath);
+    if ($ju_article->get_date() < strtotime("-14 days")) continue;
+
array_push($this->items, new FeedItem_Atom($article, $this->doc, $this->xpath));
}

(And the same logic for each feed type.)

This seems to work as I like, forcibly dropping everything older than two weeks (I generally don’t care for old content). However, as it is a core change, I’ll have to reimplement it each time TTRSS is updated. Any chance of getting a hook in there somewhere (perhaps operating on $articles prior to that foreach), to do this type of prefiltering in a plugin?

Vastaa viestiin sen kontekstissa (Tiny Tiny RSS Community Forums)