(shr-rescale-image): Add an :ascent of 100 to images so that the underline comes...
[gnus] / lisp / nnrss.el
1 ;;; nnrss.el --- interfacing with RSS
2
3 ;; Copyright (C) 2001-2011  Free Software Foundation, Inc.
4
5 ;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
6 ;; Keywords: RSS
7
8 ;; This file is part of GNU Emacs.
9
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
14
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 ;; GNU General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
22
23 ;;; Commentary:
24
25 ;;; Code:
26
27 ;; For Emacs <22.2 and XEmacs.
28 (eval-and-compile
29   (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
30
31 (eval-when-compile (require 'cl))
32
33 (require 'gnus)
34 (require 'nnoo)
35 (require 'nnmail)
36 (require 'message)
37 (require 'mm-util)
38 (require 'gnus-util)
39 (require 'time-date)
40 (require 'rfc2231)
41 (require 'mm-url)
42 (require 'rfc2047)
43 (require 'mml)
44 (eval-when-compile
45   (ignore-errors
46    (require 'xml)))
47 (eval '(require 'xml))
48
49 (nnoo-declare nnrss)
50
51 (defvoo nnrss-directory (nnheader-concat gnus-directory "rss/")
52   "Where nnrss will save its files.")
53
54 (defvoo nnrss-ignore-article-fields '(slash:comments)
55   "*List of fields that should be ignored when comparing RSS articles.
56 Some RSS feeds update article fields during their lives, e.g. to
57 indicate the number of comments or the number of times the
58 articles have been seen.  However, if there is a difference
59 between the local article and the distant one, the latter is
60 considered to be new.  To avoid this and discard some fields, set
61 this variable to the list of fields to be ignored.")
62
63 ;; (group max rss-url)
64 (defvoo nnrss-server-data nil)
65
66 ;; (num timestamp url subject author date extra)
67 (defvoo nnrss-group-data nil)
68 (defvoo nnrss-group-max 0)
69 (defvoo nnrss-group-min 1)
70 (defvoo nnrss-group nil)
71 (defvoo nnrss-group-hashtb (make-hash-table :test 'equal))
72 (defvoo nnrss-status-string "")
73
74 (defconst nnrss-version "nnrss 1.0")
75
76 (defvar nnrss-group-alist '()
77   "List of RSS addresses.")
78
79 (defvar nnrss-use-local nil
80   "If non-nil nnrss will read the feeds from local files in nnrss-directory.")
81
82 (defvar nnrss-description-field 'X-Gnus-Description
83   "Field name used for DESCRIPTION.
84 To use the description in headers, put this name into `nnmail-extra-headers'.")
85
86 (defvar nnrss-url-field 'X-Gnus-Url
87   "Field name used for URL.
88 To use the description in headers, put this name into `nnmail-extra-headers'.")
89
90 (defvar nnrss-content-function nil
91   "A function which is called in `nnrss-request-article'.
92 The arguments are (ENTRY GROUP ARTICLE).
93 ENTRY is the record of the current headline.  GROUP is the group name.
94 ARTICLE is the article number of the current headline.")
95