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

Re: Offline mode for shimbun retrieval

>>>>> In [emacs-w3m : No.10455] David Engster wrote:
> I'm in the process of completely converting from nnrss to nnshimbun in
> Gnus. One feature that I like in nnrss is the possibility to use it in
> "local mode", where an external script downloads the feeds. This script
> can be called asynchronously from Emacs or regularly through cron, which
> speeds up checking the groups considerably.

> I've implemented this for emacs-w3m/shimbun; the patch is attached to
> this mail. It also contains a function for generating a download shell
> script, which is specific to Gnus/nnshimbun, but I guess it should be
> possible to create something similar for the other Emacs mail
> readers. For example, a script for downloading the emacswiki RSS looks
> like this:

> ,----
>| #!/bin/sh
>| # shimbun download script
>| W3M=/usr/bin/w3m
>| OPTS="-o accept_encoding=identity -dump_both"
>| umask 066
>| $W3M $OPTS http://www.emacswiki.org/emacs/full.rss > /tmp/465e89d887_shimbun
> `----

> The filenames used for saving the shimbuns are generated through a md5
> of the URL (truncated to the first 10 chars).

Isn't the truncation unnecessary?  I'm worried about the confliction
of file names.

> The default directory is /tmp, but this can be customized. If a file
> for a URL is not available, it is retrieved as usual.

The patches look good to me except for a few things.  Though I haven't
tried the feature yet, I believe it must be useful.

> +(defcustom shimbun-local-path temporary-file-directory
> +  "Directory where local shimbun files are stored.
> +Default is the system's temporary directory."
> +  :group 'shimbun
> +  :type 'directory)

`temporary-file-directory' is available only in Emacs.  For XEmacs
users, it should be the return value of the `(temp-directory)'
like this:

(defcustom shimbun-local-path (if (featurep 'xemacs)

But how about making it default to the value of

--8<---------------cut here---------------start------------->8---
*Default directory where downloaded files will be saved to.
--8<---------------cut here---------------end--------------->8---

> +(defun nnshimbun-generate-download-script (&optional async)
> +  "Generate download script for all subscribed schimbuns.
> +Output will be put in a new buffer.  If called with a prefix,
> +puts a '&' after each curl command."
Is curl faster than w3m? ;-)  I guess it's true because curl is
much smaller than w3m.  (If you make it customizable like mm-url.el
does, it seems to be better to do it in shimbun.el since Wanderlust
users and Mew users will use it in the future.)