passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
146 stars 21 forks source link

Implement Fever "Hot Links" #68

Open passiomatic opened 10 years ago

passiomatic commented 10 years ago

Implement Fever "Hot Links" as plugin. "Hot LInks" should appear in the web UI too.

From: Why and how I use Fever.

[Fever] curates (everyone's favorite buzzword!) your feeds and pulls out the most frequently linked-to items. Fever turns these items into a "Hot" list ranked by temperature. The more popular an item is, the higher its temperature is. One of the greatest features of Fever's Hot list is that its items don't necessarily have to come from feeds you've subscribed to. For example, a couple of weeks ago, when Twitter posted its infamous "Changes coming in Version 1.1 of the Twitter API" announcement, it very quickly made it to the top of my Hot list, even though I don't subscribe to Twitter's development feed. The announcement reached the top of my Hot list because so many sites I do subscribe to (Daring Fireball, The Brooks Review, The Unofficial Apple Weblog, etc.) linked to it. Thanks to Fever's Hot list, you don't have to spend all of your free time scrolling through endless feeds trying to find interesting items. You can go to Fever (or open up Sunstroke on your iPhone), check to see if there are any new Hot items, and then go back to whatever it was you were doing.

dylan-k commented 7 years ago

Is this still something that's in the works?

passiomatic commented 7 years ago

There's some work done in the hotlinks branch but I've stopped to work on that a long time ago. In the end I wasn't able to understand how ranking for "hot links" works in Fever.

If someone have access to Fever PHP code it would be interesting to know how the details are implemented.

dylan-k commented 7 years ago

I have access to that. I'll take a look.

dylan-k commented 7 years ago

ok I'll do my best to give a general summary. let me know if you have specific questions?

  1. For each post in each RSS feed, find all the links
  2. For each of those links, collect: the URL of the link, the title attribute if there is one, and make a checksum. (it would be preferable, although a bit more work, to grab the title and description of the page itself. Fever never did it this way.)
  3. Store the items collected from step two above in a unique data table for this purpose. also do a timestamp for when each row is created.
  4. Now you can query a list of all the links in all the feeds, with some assurance that you know it's unique and what it's name is. If a link (i.e. its checksum) occurs frequently, then it can be "hot".
  5. The more frequently a link occurs, the more "hot" it is. Fever does this on a 0-100 scale, where anything above 99.8 is considered to have a "fever" because of its "hotness" (but of course other metaphors could be used instead). I've seen some things get a "fever" of almost 106.7 degrees, but that's about as hot as it gets.
  6. A URL has to be mentioned by two or more different RSS feeds before it can be considered to have any heat at all. The lowest heat a URL can get is 99.9, when there are only 2 references to it.
  7. Thanks to those timestamps, you can query the hot links, according to when they were (presumably) posted about: in the last X days, or within the last Y weeks.

It's slightly more complicated than all that, because the app's concepts of "kindling" and "sparks" (i.e. "must read" and "fodder" feeds) can give more-or-less "heat" to a URL by linking to it, but that's the basic functionality from what I can tell.

passiomatic commented 7 years ago

Great report, thank you. Now it's more clear how this thing works. There is some code in place which implements points 1, 2 and perhaps partially 3 and 4.

As a first version it would be good to have a list of hot link, and if possible, add "kindling" and "sparks" so-called supergroups later. No ETA for this, although the functionality seems interesting on its own.