Gnus development mailing list
 help / color / mirror / Atom feed
* nnrss-generate-download-script
@ 2003-01-01 23:05 Jan Egil Hagen
  2003-01-02 19:53 ` nnrss-generate-download-script Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Egil Hagen @ 2003-01-01 23:05 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

I figured more people than me might be interested in this version of
nnrss-generate-download-script that downloads the RSS files in
parallel and generates the script in the nnrss directory rather than
inserting it in the current buffer.  I've also changed a few uses of
second to nth 1 since second is from the cl package.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnrss.el.diff --]
[-- Type: text/x-patch, Size: 1659 bytes --]

167c167,169
< (defvar nnrss-use-local nil)
---
> (defvar nnrss-use-local nil 
>   "If true, don't download RSS feed if local version downloaded with
> the script generated by nnrss-generate-download-script exists.")
182a185,192
> 
> (defvar nnrss-wget-command "wget"
> "The command used as wget in nnrss-generate-download-script")
> 
> (defvar nnrss-generated-download-script-file 
>   (format "%s/download-script.sh" (expand-file-name nnrss-directory))
> "Where to place the script generated by nnrss-generate-download-script")
> 
485c495
< 			  (second (assoc group nnrss-group-alist))))
---
> 			  (nth 1 (assoc group nnrss-group-alist))))
544,552c554,567
<   (insert "#!/bin/sh\n")
<   (insert "WGET=wget\n")
<   (insert "RSSDIR='" (expand-file-name nnrss-directory) "'\n")
<   (dolist (elem nnrss-server-data)
<     (let ((url (or (nth 2 elem)
< 		   (second (assoc (car elem) nnrss-group-alist)))))
<       (insert "$WGET -q -O \"$RSSDIR\"/'"
< 	      (nnrss-translate-file-chars (concat (car elem) ".xml"))
< 	      "' '" url "'\n"))))
---
>   (with-temp-buffer
>     (insert "#!/bin/sh\n")
>     (insert "WGET="  nnrss-wget-command "\n")
>     (insert "RSSDIR='" (expand-file-name nnrss-directory) "'\n")
>     (dolist (elem nnrss-server-data)
>       (let ((url (or (nth 2 elem)
> 		     (nth 1 (assoc (car elem) nnrss-group-alist)))))
> 	(insert "$WGET -q -O \"$RSSDIR\"/'"
> 		(nnrss-translate-file-chars (concat (car elem) ".xml"))
> 		"' '" url "' &\n")))
>     (insert "wait\n")
>     (write-region (point-min) (point-max) 
> 		  nnrss-generated-download-script-file)
>     (set-file-modes nnrss-generated-download-script-file 448)))
553a569
> 

[-- Attachment #3: Type: text/plain, Size: 200 bytes --]


One other thing: I don't really /get/ nnoo, and this makes it a bit
difficult to understand the different back ends.  Does any
documentation exist anywhere?

-- 
   World works; done by its invalids

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

end of thread, other threads:[~2003-01-02 20:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-01 23:05 nnrss-generate-download-script Jan Egil Hagen
2003-01-02 19:53 ` nnrss-generate-download-script Lars Magne Ingebrigtsen
2003-01-02 20:19   ` nnrss-generate-download-script Jan Egil Hagen
2003-01-02 20:29     ` nnrss-generate-download-script Lars Magne Ingebrigtsen
2003-01-02 20:37       ` nnrss-generate-download-script Jan Egil Hagen
2003-01-02 20:39         ` nnrss-generate-download-script Lars Magne Ingebrigtsen

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