;; emchat-curl.el --- Download files from log buffer -*- Emacs-Lisp -*-
-;; Copyright (C) 2007 - 2010 Steve Youngs
+;; Copyright (C) 2007 - 2011 Steve Youngs
;; Author: Steve Youngs <steve@emchat.org>
;; Maintainer: Steve Youngs <steve@emchat.org>
;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;; Commentary:
-;;
+;;
;; Download stuff from URls in your log buffer via ffi-curl.el.
;; That means you need SXEmacs to use this.
;;; Todo:
;;
-;;
+;;
;;; Code:
(eval-when-compile
(emchat-log-info
"Job: %s
Detail: #<job :url <%s>
- :local-file \"%s\"
- :size %d bytes%s
- :speed %s>
+ :local-file \"%s\"
+ :size %d bytes%s
+ :speed %s>
"
job url file size
(cond
(format "%0.2f B/s" speed)))))))
(emchat-do-in-sxemacs
- (defregexp emchat-curl-filename-regexp (concat emchat-emphasis-url-regexp
+ (defregexp emchat-curl-filename-regexp (concat emchat-emphasis-url-regexp
"/\\([^/].*$\\)")
"Regexp matching the file part of a URL."))
(emchat-do-in-xemacs
- (defconst emchat-curl-filename-regexp (concat emchat-emphasis-url-regexp
+ (defconst emchat-curl-filename-regexp (concat emchat-emphasis-url-regexp
"/\\([^/].*$\\)")
"Regexp matching the file part of a URL."))
file)
(unless (file-directory-p dir)
(make-directory-path dir))
- (setq file
+ (setq file
(and (string-match fregexp url)
(not (string=
"/"
file)
(unless (file-directory-p dir)
(make-directory-path dir))
- (setq file
+ (setq file
(and (string-match fregexp url)
(not (string=
"/"