Gnus development mailing list
 help / color / mirror / Atom feed
* Fetching by MID with new Google Groups
@ 2005-09-02 16:35 Reiner Steib
  2005-09-06  8:44 ` Yair Friedman
  0 siblings, 1 reply; 6+ messages in thread
From: Reiner Steib @ 2005-09-02 16:35 UTC (permalink / 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/




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-08  8:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-02 16:35 Fetching by MID with new Google Groups Reiner Steib
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

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).