paul-issartel / nnreddit

Reddit backend for Gnus
GNU General Public License v3.0
0 stars 0 forks source link

Subreddit as group? #4

Open alphapapa opened 8 years ago

alphapapa commented 8 years ago

Hi,

(Again, if you're not interested in maintaining this, just say so and I'll stop posting issues. :) )

Would it be possible to treat subreddits as groups and stories/comments as threads, rather than treating stories/comments as separate groups? In a way it seems handy to subscribe to a story's comments by subscribing to its group, but it would seem more natural (or more like Gnus) to treat a subreddit as a group and mark interesting stories and comment threads with the marking and scoring functions.

What do you think?

Thanks.

paul-issartel commented 8 years ago

I think that you can already do that by calling the nnreddit-subscribe-to-thread command on a story or comment article.

Does this command work as expected?

alphapapa commented 8 years ago

Yes, that works as expected. But what I meant was, it would seem more natural to treat an entire subreddit as a single group, and treat stories as threads, with comments as subthreads. :) Then you could mark interesting threads and increase their score, etc.

paul-issartel commented 8 years ago

Well, I'm not sure to understand what you are suggesting then. You can already turn a subreddit into a Gnus group in the current version, by subscribing to nnreddit:some-subreddit-name. This is actually the intended usage as demonstrated in the readme. After opening this group it contains the first 50 "stories" (or "links", "posts", whatever it's called) of the subreddit. When you select any of them it becomes the root of a thread under which comments are inserted, arranged as subthreads. Did I miss something?

(also, marking articles may not work correctly until a persistent mapping between article IDs and Reddit IDs is implemented)

alphapapa commented 8 years ago

Hm, maybe I'm the one who missed something then. That's what I was doing already, until--I think--I ran a catchup command, and after that, selecting a story didn't insert comments anymore.

(also, marking articles may not work correctly until a persistent mapping between article IDs and Reddit IDs is implemented)

When that is done, will it enable new comments to be inserted as if they were new articles in an NNTP group?

What I'm used to is having Gnus show subscribed groups with new messages in the groups buffer, then only new messages in the summary buffer, and pressing SPC cycles through the new messages. I was thinking that it would be really slick to have that same workflow with Reddit stories and comments, but if comments have to be manually inserted by selecting stories with RET, I guess that wouldn't work...?

paul-issartel commented 8 years ago

Well, there has to be some compromises to integrate a web forum into a newsreader. I need to account for the specifics of the Reddit API as well. Comments have to be fetched separately, on-demand. This is very different from how a NNTP server works.

Hypothetically, it might be possible to look at the number of comments on each "story" and only re-fetch comments for stories where this number has changed. Of course it is not fully reliable: a comment might be deleted then another added, comments can also be edited...

But above all it would result in many more API requests on Reddit servers than with the current lazy-loading scheme. And this is something I'd like to avoid. Reddit servers are tailored for a forum-like navigation pattern, not for bulk download of every thread at once.

So if read/unread status was handled, it would probably only display unread "stories" by default. Unread comments would not be displayed until you select the parent story.

alphapapa commented 8 years ago

Hmm. I guess the issue for me is that I'm typically more interested in the comments than the stories themselves, especially following interesting threads to see what people say at a later time. Making it easier to keep up with things like that would be nice, which seems to be generally one of Gnus's strengths. But I guess there's only so much that can be done with Reddit's API. I guess what we need is a Reddit-to-NNTP gateway... (shudder :D ) If only Gmane had one...

paul-issartel commented 8 years ago

Thinking about it, one solution would be to turn the threads you are interested in into Gnus groups with the nnreddit-subscribe-to-thread command, so that Gnus would only fetch these threads at a regular interval (rather than re-fetching the entire subreddit at once). This better corresponds to normal browsing and would certainly not count as abuse of the API. The downside is that you would have to manage a long list of groups in Gnus.

(edit: I realize that this is what you were talking about in your first message, but for some reason I didn't get it at first. With the read/unread status correctly handled this would become actually usable.)

I've indeed considered writing a Reddit-to-NNTP gateway before starting this project, but it would have required bulk download of all comments which I wanted to avoid. But the solution with nnreddit-subscribe-to-thread seems a good compromise, I'll look into it if I ever find the time to implement the read/unread status.

alphapapa commented 8 years ago

The downside is that you would have to manage a long list of groups in Gnus.

Yeah, that's what I was wishing to avoid. I guess if it weren't for the API getting in the way, each subreddit could be a group, and each story a top-level thread. Would it help if the API had a call to get only comments after a certain date? Of course it would have to also return the IDs of parent comments for threading...and then I guess you've reimplemented NNTP, haha. Oh well, thanks. :)

paul-issartel commented 8 years ago

then I guess you've reimplemented NNTP

Exactly :) Feel free to lobby the Reddit admins to implement NNTP access though!

alphapapa commented 8 years ago

Feel free to lobby the Reddit admins to implement NNTP access though!

LOL, fat chance there, I'm afraid. Maybe in a future Reddit competitor...