So I, like everyone else in the world, wrote my own RSS aggregator. And I think it’s pretty good. It does everything the way I like to do things. If I want a feature, I add it. If I realize I never use something, I remove it. It’s also got a couple secret things that you don’t usually find in an aggregator. For example, some authors only show a short blurb in their feeds. I have an option that lets you select if you want to show the whole page right there in the reader. Another one: I work at a place that has a somewhat moronic firewall filter on it. So there’s an option to use a ssl web-based proxy right there in the window. And to take the link to a new window, etc. Just little things like that that make my day a lot easier that I haven’t seen in other readers.
I want to add a new feature. When in an individual article in a potentially huge list of them, I want a “Next” and “Previous” button. All this has to do is
1- Show the next/previous article (obviously).
2- If the list of articles is displayed, mark the new article as read (if not already marked so).
3- Decrement the Category and Feed count by one, marking empty if needed.
You could go through and do fancy stuff like caching the next and previous, etc. But this is the minimal amount that needs to be done to maintain the current look.
The problem is the data representation. I’m outputting JSON, and can parse through it easily enough obviously. The problem is the next and previous. As the root of the data array, I have the id of the articles. Easy enough, everything else is under it. But….
How do you increment and decrement the current index (go back and forward) in a non-contiguous integer array? If it’s a normal array, it goes 0,1,2,3,etc… But this one could be 2,3,9,13,15,235, etc…
It’s also not something I’ve seen in other readers yet. So I can’t just steal other peoples’ good ideas.