Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Fetching by MID with new Google Groups
Date: Fri, 02 Sep 2005 18:35:20 +0200	[thread overview]
Message-ID: <v93bon1l87.fsf@marauder.physik.uni-ulm.de> (raw)

Hi,

here's a patch to support fetching article by MID from Google Groups
interface (see `gnus-refer-article-method').

I'm not sure if the function `nnweb-google-wash-article' does anything
useful these days (and/or is used elsewhere), so I added used a
different name (`nnweb-google-wash-article-source').  If
`nnweb-google-wash-article' isn't useful, I'd replace it by my new
function.

Does `gnus-group-make-web-group' (G w) work with the current code?

--8<---------------cut here---------------start------------->8---
--- nnweb.el	26 Aug 2005 00:05:03 -0000	7.8
+++ nnweb.el	2 Sep 2005 16:25:22 -0000
@@ -54,13 +54,13 @@
 
 (defvar nnweb-type-definition
   '((google
-     (article . ignore)
-     (id . "http://groups.google.de/groups?selm=%s&output=gplain")
+     (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
+     (article . nnweb-google-wash-article-source)
      (reference . identity)
      (map . nnweb-google-create-mapping)
      (search . nnweb-google-search)
-     (address . "http://groups.google.de/groups")
-     (base    . "http://groups.google.de")
+     (address . "http://groups.google.com/groups")
+     (base    . "http://groups.google.com")
      (identifier . nnweb-google-identity))
     (dejanews ;; alias of google
      (article . ignore)
@@ -335,6 +335,17 @@
     (delete-region (point) (point-max))
     (mm-url-remove-markup)
     (widen)))
+
+(defun nnweb-google-wash-article-source ()
+  ;; We have Google's masked e-mail addresses here.  :-/
+  (let ((case-fold-search t))
+    (goto-char (point-min))
+    (delete-region (point-min)
+		   (1+ (re-search-forward "^<pre>" nil t)))
+    (goto-char (point-min))
+    (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>"))
+		   (point-max))
+    (mm-url-decode-entities)))
 
 (defun nnweb-google-parse-1 (&optional Message-ID)
   (let ((i 0)
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




             reply	other threads:[~2005-09-02 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-02 16:35 Reiner Steib [this message]
2005-09-06  8:44 ` Yair Friedman
2005-09-06 19:05   ` Reiner Steib
2005-09-07  9:55     ` Yair Friedman
2005-09-07 14:04       ` Reiner Steib
2005-09-08  8:25         ` Yair Friedman

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=v93bon1l87.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /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).