Skip to content

Instantly share code, notes, and snippets.

@rnkn
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnkn/89e0072c93402c1c1406 to your computer and use it in GitHub Desktop.
Save rnkn/89e0072c93402c1c1406 to your computer and use it in GitHub Desktop.
Emacs function to run a dynamic asynchronous shell command to fetch RSS feeds
(defun -nnrss-fetch-async ()
"Run a dynamic asynchronous shell command to fetch RSS feeds.
Creates a dynamic shell command to fetch RSS feeds in
`nnrss-group-alist' and runs using `async-shell-command'."
(interactive)
(or nnrss-use-local
(setq nnrss-use-local t))
(let* ((rssdir (expand-file-name nnrss-directory))
list
(fetch-str
(dolist (var nnrss-server-data list)
(let* ((url (or (nth 2 var)
(second (assoc (car var)
nnrss-group-alist)))))
(setq list
(concat list " -o '" rssdir
(nnrss-translate-file-chars (concat (car var) ".xml"))
"' '" url "'")))))
(command (concat "curl" fetch-str)))
(async-shell-command command "*nnRSS Fetch RSS Process*")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment