Function: nnrss-opml-import
nnrss-opml-import is an interactive and byte-compiled function defined
in nnrss.el.gz.
Signature
(nnrss-opml-import OPML-FILE)
Documentation
OPML subscriptions import.
Read the file and attempt to subscribe to each Feed in the file.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnrss.el.gz
(defun nnrss-opml-import (opml-file)
"OPML subscriptions import.
Read the file and attempt to subscribe to each Feed in the file."
(interactive "fImport file: ")
(mapc
(lambda (node)
(let ((xmlurl (cdr (assq 'xmlUrl (cadr node)))))
(when (and xmlurl
(not (string-match "\\`[\t ]*\\'" xmlurl))
(prog1
(y-or-n-p (format "Subscribe to %s?" xmlurl))
(message "")))
(condition-case err
(progn
(gnus-group-make-rss-group xmlurl)
(forward-line 1))
(error
(message
"Failed to subscribe to %s (%s); type any key to continue: "
xmlurl
(error-message-string err))
(let ((echo-keystrokes 0))
(read-char)))))))
(nnrss-find-el 'outline
(mm-with-multibyte-buffer
(insert-file-contents opml-file)
(xml-parse-region (point-min) (point-max))))))