Gnus development mailing list
 help / color / mirror / Atom feed
From: michael.cadilhac@lrde.org (Michaël Cadilhac)
Subject: Re: nnrss and some (partially redundant) RSS feeds.
Date: Tue, 23 May 2006 15:31:58 +0200	[thread overview]
Message-ID: <87irnw27g1.fsf_-_@lrde.org> (raw)
In-Reply-To: <v94q11z7hx.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Mon, 10 Apr 2006 19:05:14 +0200")


[-- Attachment #1.1: Type: text/plain, Size: 245 bytes --]


  Hi!

  I come back to you as my assignment paper is, at last, signed,
  returned and validated.

  This message is a follow-up of my message of March:
  http://article.gmane.org/gmane.emacs.gnus.general/62464

  The patch is again attached:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: nnrss-md5.patch --]
[-- Type: text/x-patch, Size: 4297 bytes --]

Index: ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1099
diff -c -r7.1099 ChangeLog
*** ChangeLog	27 Mar 2006 09:42:59 -0000	7.1099
--- ChangeLog	27 Mar 2006 16:54:36 -0000
***************
*** 0,0 ****
--- 1,6 ----
+ 2006-03-27  Michael Cadilhac  <micha@mahaena.lrde> (tiny change)
+ 
+ 	* nnrss.el (nnrss-check-group): Use the md5sum of the whole RSS
+ 	item as its hash index. Store this hash in `nnrss-group-data'.
+ 	(nnrss-read-group-data): Update accordingly.
+ 
Index: nnrss.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnrss.el,v
retrieving revision 7.43
diff -c -r7.43 nnrss.el
*** nnrss.el	16 Jan 2006 22:57:40 -0000	7.43
--- nnrss.el	27 Mar 2006 16:54:36 -0000
***************
*** 576,582 ****
  	  (insert-file-contents file)
  	  (eval-region (point-min) (point-max))))
        (dolist (e nnrss-group-data)
! 	(puthash (or (nth 2 e) (nth 6 e)) t nnrss-group-hashtb)
  	(when (and (car e) (> nnrss-group-min (car e)))
  	  (setq nnrss-group-min (car e)))
  	(when (and (car e) (< nnrss-group-max (car e)))
--- 576,582 ----
  	  (insert-file-contents file)
  	  (eval-region (point-min) (point-max))))
        (dolist (e nnrss-group-data)
! 	(puthash (nth 9 e) t nnrss-group-hashtb)
  	(when (and (car e) (> nnrss-group-min (car e)))
  	  (setq nnrss-group-min (car e)))
  	(when (and (car e) (< nnrss-group-max (car e)))
***************
*** 658,664 ****
  
  (defun nnrss-check-group (group server)
    (let (file xml subject url extra changed author date feed-subject
! 	     enclosure comments rss-ns rdf-ns content-ns dc-ns)
      (if (and nnrss-use-local
  	     (file-exists-p (setq file (expand-file-name
  					(nnrss-translate-file-chars
--- 658,664 ----
  
  (defun nnrss-check-group (group server)
    (let (file xml subject url extra changed author date feed-subject
! 	     enclosure comments rss-ns rdf-ns content-ns dc-ns hash-index)
      (if (and nnrss-use-local
  	     (file-exists-p (setq file (expand-file-name
  					(nnrss-translate-file-chars
***************
*** 690,704 ****
      (dolist (item (nreverse (nnrss-find-el (intern (concat rss-ns "item")) xml)))
        (when (and (listp item)
  		 (string= (concat rss-ns "item") (car item))
! 		 (if (setq url (nnrss-decode-entities-string
! 				(nnrss-node-text rss-ns 'link (cddr item))))
! 		     (not (gethash url nnrss-group-hashtb))
! 		   (setq extra (or (nnrss-node-text content-ns 'encoded item)
! 				   (nnrss-node-text rss-ns 'description item)))
! 		   (not (gethash extra nnrss-group-hashtb))))
  	(setq subject (nnrss-node-text rss-ns 'title item))
! 	(setq extra (or extra
! 			(nnrss-node-text content-ns 'encoded item)
  			(nnrss-node-text rss-ns 'description item)))
  	(if (setq feed-subject (nnrss-node-text dc-ns 'subject item))
  	    (setq extra (concat feed-subject "<br /><br />" extra)))
--- 690,701 ----
      (dolist (item (nreverse (nnrss-find-el (intern (concat rss-ns "item")) xml)))
        (when (and (listp item)
  		 (string= (concat rss-ns "item") (car item))
! 		 (progn (setq hash-index (md5 (gnus-prin1-to-string item)))
! 			(not (gethash hash-index nnrss-group-hashtb))))
  	(setq subject (nnrss-node-text rss-ns 'title item))
! 	(setq url (nnrss-decode-entities-string
! 		   (nnrss-node-text rss-ns 'link (cddr item))))
! 	(setq extra (or (nnrss-node-text content-ns 'encoded item)
  			(nnrss-node-text rss-ns 'description item)))
  	(if (setq feed-subject (nnrss-node-text dc-ns 'subject item))
  	    (setq extra (concat feed-subject "<br /><br />" extra)))
***************
*** 740,748 ****
  	  date
  	  (and extra (nnrss-decode-entities-string extra))
  	  enclosure
! 	  comments)
  	 nnrss-group-data)
! 	(puthash (or url extra) t nnrss-group-hashtb)
  	(setq changed t))
        (setq extra nil))
      (when changed
--- 737,746 ----
  	  date
  	  (and extra (nnrss-decode-entities-string extra))
  	  enclosure
! 	  comments
! 	  hash-index)
  	 nnrss-group-data)
! 	(puthash hash-index t nnrss-group-hashtb)
  	(setq changed t))
        (setq extra nil))
      (when changed

[-- Attachment #1.3: Type: text/plain, Size: 401 bytes --]


  I use it since March and don't have any problem.

  Thanks in advance.

-- 
 |      Michaël `Micha' Cadilhac   |     Le copillage-collage               |
 |         Epita/LRDE Promo 2007   |        tue le programmeur.             |
 | http://www.lrde.org/~cadilh_m   |            -- Dictons LRDE             |
 `--  -   JID: micha@amessage.be --'                                   -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

  parent reply	other threads:[~2006-05-23 13:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-10 12:18 [gnus.ding] Fwd: " Michaël Cadilhac
2006-04-10 16:29 ` [gnus.ding] Fwd: nnrss and some (partially redundant) RSS Jason L Tibbitts III
2006-04-10 17:01   ` [gnus.ding] Fwd: nnrss and some (partially redundant) RSS feeds Michaël Cadilhac
2006-04-10 17:05 ` Reiner Steib
2006-04-11  6:16   ` Lars Magne Ingebrigtsen
2006-04-11 16:41     ` Gnus hacking mood (was: [gnus.ding] Fwd: nnrss and some (partially redundant) RSS feeds.) Reiner Steib
2006-04-11 16:49       ` Gnus hacking mood Lars Magne Ingebrigtsen
2006-04-11 17:40         ` Reiner Steib
2006-04-12  4:35           ` Lars Magne Ingebrigtsen
2006-05-23 13:31   ` Michaël Cadilhac [this message]
2006-05-23 14:50     ` nnrss and some (partially redundant) RSS feeds Reiner Steib
2006-05-29  6:36       ` Andreas Seltenreich
2006-05-29 11:22         ` Michaël Cadilhac
2006-05-29 16:21           ` Andreas Seltenreich

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=87irnw27g1.fsf_-_@lrde.org \
    --to=michael.cadilhac@lrde.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).