Function: newsticker--image-get
newsticker--image-get is a byte-compiled function defined in
newst-backend.el.gz.
Signature
(newsticker--image-get FEED-NAME FILENAME DIRECTORY URL)
Documentation
Get image for FEED-NAME by returning FILENAME from DIRECTORY.
If the file does no exist or if it is older than 24 hours download it from URL first.
Source Code
;; Defined in /usr/src/emacs/lisp/net/newst-backend.el.gz
(defun newsticker--image-get (feed-name filename directory url)
"Get image for FEED-NAME by returning FILENAME from DIRECTORY.
If the file does no exist or if it is older than 24 hours
download it from URL first."
(let ((image-name (concat directory feed-name)))
(if (and (file-exists-p image-name)
(time-less-p nil
(time-add (file-attribute-modification-time
(file-attributes image-name))
86400)))
(newsticker--debug-msg "%s: Getting image for %s skipped"
(format-time-string "%A, %H:%M")
feed-name)
;; download
(newsticker--debug-msg "%s: Getting image for %s"
(format-time-string "%A, %H:%M")
feed-name)
(if (eq newsticker-retrieval-method 'intern)
(newsticker--image-download-by-url feed-name filename directory url)
(newsticker--image-download-by-wget feed-name filename directory url)))))