[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

sb-the-register.el fix



Hello,

2008-04-22 David Hansen <david.hansen@xxxxxxx>

        * (shimbun-the-register-x-face-alist): New variable.
        * (shimbun-get-headers): Remove URL rewriting.
        * (shimbun-make-contents): Remove more ads.
*** sb-the-register.el.~1.8.~	2007-03-05 01:23:27.000000000 +0100
--- sb-the-register.el	2008-04-22 21:57:23.000000000 +0200
***************
*** 36,41 ****
--- 36,45 ----
  (defvar shimbun-the-register-content-start "<h2>")
  (defvar shimbun-the-register-content-end
    "<p class=\"Furniture\">\\|<p id=\"Copyright\">")
+ (defvar shimbun-the-register-x-face-alist
+   '(("default" . "X-Face: 'r-3ZQiX|_[TrM[|LF34{X#MX`MHFuL$_2w4Cs\"ET_jx9/JsL)k\
+ xvY~i(,cv8ho2=\\L!Tz# @=+.N^%}G<@JRS<ZeD90JN/,oDx.o:\\-kBeyKN%DzZ)s|Ck69P6WY6^\
+ IPf~GT+xfvp:1-BRTK7'f&\"\"mr'CflD?Q2R%IkV>")))
  
  (defvar shimbun-the-register-path-alist
    '(("news" . "headlines.rss")
***************
*** 61,76 ****
    ((shimbun shimbun-the-register) &optional range)
    (mapcar
     (lambda (header)
!      ;; we will get redirected from http://go.theregister.com/feed/... to
!      ;; http://www.theregister.co.uk/...
!      ;; if we don't set the URL right shimbun can't follow the <img src=
!      (let ((url (shimbun-header-xref header)))
!        (setq url (w3m-replace-in-string
! 		  url
! 		  "http://go\\.theregister\\.com/feed/"
! 		  ""))
!        (shimbun-header-set-xref
! 	header (concat url "print.html")))
       header)
     (luna-call-next-method)))
  
--- 65,72 ----
    ((shimbun shimbun-the-register) &optional range)
    (mapcar
     (lambda (header)
!      (shimbun-header-set-xref
!       header (concat (shimbun-header-xref header) "print.html"))
       header)
     (luna-call-next-method)))
  
***************
*** 79,85 ****
    (save-excursion
      ;; remove annoying stuff
      (dolist (junk '(("(?<span class=\"URL\">" . "</span>)?")
!                     ("<div \\(class\\|id\\)=\"[^\"]*Ad\"" . "</div>")))
        (goto-char (point-min))
        (message "%s" (car junk))
        (while (re-search-forward (car junk) nil t)
--- 75,82 ----
    (save-excursion
      ;; remove annoying stuff
      (dolist (junk '(("(?<span class=\"URL\">" . "</span>)?")
!                     ("<div \\(class\\|id\\)=\"[^\"]*Ad\"" . "</div>")
!                     ("<a href=\"http://ad\." . "</a>")))
        (goto-char (point-min))
        (message "%s" (car junk))
        (while (re-search-forward (car junk) nil t)