1 ;;; nnweb.el --- retrieving articles via web search engines
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
4 ;; 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
28 ;; Note: You need to have `w3' installed for some functions to work.
32 (eval-when-compile (require 'cl))
44 (autoload 'w3-parse-buffer "w3-parse")
48 (defvoo nnweb-directory (nnheader-concat gnus-directory "nnweb/")
49 "Where nnweb will save its files.")
51 (defvoo nnweb-type 'google
52 "What search engine type is being used.
53 Valid types include `google', `dejanews', and `gmane'.")
55 (defvar nnweb-type-definition
57 (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
58 (result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
59 (article . nnweb-google-wash-article)
60 (reference . identity)
61 (map . nnweb-google-create-mapping)
62 (search . nnweb-google-search)
63 (address . "http://groups.google.com/groups")
64 (base . "http://groups.google.com")
65 (identifier . nnweb-google-identity))
66 (dejanews ;; alias of google
67 (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
68 (result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
69 (article . nnweb-google-wash-article)
70 (reference . identity)
71 (map . nnweb-google-create-mapping)
72 (search . nnweb-google-search)
73 (address . "http://groups.google.com/groups")
74 (base . "http://groups.google.com")
75 (identifier . nnweb-google-identity))
77 (article . nnweb-gmane-wash-article)
78 (id . "http://gmane.org/view.php?group=%s")
79 (reference . identity)
80 (map . nnweb-gmane-create-mapping)
81 (search . nnweb-gmane-search)
82 (address . "http://search.gmane.org/nov.php")
83 (identifier . nnweb-gmane-identity)))
84 "Type-definition alist.")
86 (defvoo nnweb-search nil
87 "Search string to feed to Google.")
89 (defvoo nnweb-max-hits 999
90 "Maximum number of hits to display.")
92 (defvoo nnweb-ephemeral-p nil
93 "Whether this nnweb server is ephemeral.")