Function: newsticker--parse-generic-feed
newsticker--parse-generic-feed is a byte-compiled function defined in
newst-backend.el.gz.
Signature
(newsticker--parse-generic-feed NAME TIME TITLE DESC LINK EXTRA-ELEMENTS)
Documentation
Parse generic news feed data.
Argument NAME gives the name of a news feed. TIME gives the system time at which the data have been retrieved.
The arguments TITLE, DESC, LINK, and EXTRA-ELEMENTS give the feed's title, description, link, and extra elements resp.
Source Code
;; Defined in /usr/src/emacs/lisp/net/newst-backend.el.gz
(defun newsticker--parse-generic-feed (name time title desc link
extra-elements)
"Parse generic news feed data.
Argument NAME gives the name of a news feed. TIME gives the
system time at which the data have been retrieved.
The arguments TITLE, DESC, LINK, and EXTRA-ELEMENTS give the feed's title,
description, link, and extra elements resp."
(let ((title (or title "[untitled]"))
(link (or link ""))
(position 0)
(something-was-added nil))
;; decode numeric entities
(setq title (xml-substitute-numeric-entities title))
(setq desc (xml-substitute-numeric-entities desc))
(setq link (xml-substitute-numeric-entities link))
;; remove whitespace from title, desc, and link
(setq title (newsticker--remove-whitespace title))
(setq desc (newsticker--remove-whitespace desc))
(setq link (newsticker--remove-whitespace link))
;; handle the feed itself
(unless (newsticker--cache-contains newsticker--cache
(intern name) title
desc link 'feed)
(setq something-was-added t))
(setq newsticker--cache
(newsticker--cache-add newsticker--cache (intern name)
title desc link time 'feed position
extra-elements time 'feed))
something-was-added))