From: Jan Egil Hagen <janha+news@ifi.uio.no>
Subject: nnrss-generate-download-script
Date: Thu, 02 Jan 2003 00:05:30 +0100 [thread overview]
Message-ID: <yaa4r8sii85.fsf@ellifu.ifi.uio.no> (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
next reply other threads:[~2003-01-01 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-01 23:05 Jan Egil Hagen [this message]
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
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=yaa4r8sii85.fsf@ellifu.ifi.uio.no \
--to=janha+news@ifi.uio.no \
/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).