Gnus development mailing list
 help / color / mirror / Atom feed
From: dick <dick.r.chiang@gmail.com>
To: ding@gnus.org
Subject: Re: Gnus backend for GitHub/GitLab?
Date: Tue, 14 Jan 2020 23:47:43 -0500	[thread overview]
Message-ID: <87zhep9vgw.fsf@dick> (raw)
In-Reply-To: <87r201u06p.fsf@tullinup.koldfront.dk>

AS> It sounds like you've already implemented nngitlab, is this something you
AS> care to share?

I've implemented backends for Reddit and Hacker News.  You can find them in
github.com/dickmao/{nnreddit,nnhackernews}.

AS> So besides what Gnus usually does, you keep state about your mapping
AS> between GitLab's ids and article numbers - where do you keep that state,
AS> inside .newsrc.eld or in a separate file?

I keep it in memory.  By following Gnus Info Section 11.6.2 "Back End
Interface", implementing certain methods causes Gnus core to persist state in
.newsrc.eld automatically.

I am a tad skeptical about github's amenability to a Gnus backend
implementation.  You'd know better than I if their API can answer "give me all
the new messages since the last id I saw".  Both Reddit and Hacker News can
answer this.  I looked at the ghub-get call in Mr. Bernoulli's forge-github.el
and it seems to only do a RESTful query of "/notifications", which is not
quite stateful enough.

In truth I am rather content with github's existing notifications mechanism that
sends normal mail (which Gnus's basic filtering dutifully routes) for issues
I've commented on, and for repos I've self-designated "watched."  Gnus-ifying
github would be very nice, and you should press onwards, but I already get
"just show me new comments" which I couldn't get from the Reddit and Hacker News websites
(but I do now with nnreddit and nnhackernews).

I started (but currently am not) working on a backend for the Discourse API.
In particular, I want to gnus-ify emacs-china.org, which like Reddit and
Hacker News, really lends itself to this treatment.




  reply	other threads:[~2020-01-15  4:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 22:11 Adam Sjøgren
2019-11-20  3:31 ` Eric Abrahamsen
2019-11-20  4:12 ` dick.r.chiang
2019-11-20 11:33 ` Lars Ingebrigtsen
2019-11-20 12:38   ` Adam Sjøgren
     [not found]     ` <87h82ywu6i.fsf@gmx.de>
2019-11-20 15:01       ` Adam Sjøgren
     [not found]         ` <87h82yvb7r.fsf@gmx.de>
2019-11-20 15:35           ` Adam Sjøgren
2019-11-21 12:31     ` Lars Ingebrigtsen
2020-01-14 20:42 ` Adam Sjøgren
2020-01-14 21:23   ` dick
2020-01-14 22:03     ` Adam Sjøgren
2020-01-14 22:18       ` dick
2020-01-14 22:45         ` Adam Sjøgren
2020-01-15  4:47           ` dick [this message]
2020-03-17 11:03             ` dick.r.chiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhep9vgw.fsf@dick \
    --to=dick.r.chiang@gmail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).