eicq-devel
[Top] [All Lists]

Summary for eicq--main--0.9.1--patch-39

From: Steve Youngs <steve@xxxxxxxx>
Subject: Summary for eicq--main--0.9.1--patch-39
Date: Wed, 05 Sep 2007 11:51:39 +1000
Sender: eicq-devel-bounces@xxxxxxxx
Archive location: steve@xxxxxxxxxxxxxx http://arch.eicq.org/2007/

Revision: eicq--main--0.9.1--patch-39
Archive: steve@xxxxxxxxxxxxxx
Creator: Steve Youngs <steve@xxxxxxxx>
Date: Wed Sep  5 11:51:02 EST 2007
Standard-date: 2007-09-05 01:51:02 GMT
Modified-files: eicq-curl.el
New-patches: steve@xxxxxxxxxxxxxx/eicq--main--0.9.1--patch-39
Summary: Humanise eicq-curl output
Keywords: enhancement, internal, ui

This changeset makes the output from eicq-curl a bit nicer.  File sizes
and transfer speeds are shown in gigabytes, megabytes, kilobytes, bytes,
depending on size/speed.

* eicq-curl.el (eicq-curl-post-hook): Show size and speed in a more human
  readable form.


* added files

    
{arch}/eicq/eicq--main/eicq--main--0.9.1/steve@xxxxxxxxxxxxxx/patch-log/patch-39

* modified files

--- orig/eicq-curl.el
+++ mod/eicq-curl.el
@@ -96,9 +96,28 @@
        (eicq-log-info "Job failed: %s\nReason: %s" job resp-str)
       (eicq-log-info
        "Job: %s
-Remote: #<%s>
- Local: #<%s :size %d bytes :speed %d>"
-       job url file size speed))))
+Detail: #<job :url <%s>
+              :local-file \"%s\"
+              :size %d bytes%s
+              :speed %s>
+"
+       job url file size
+       (cond
+       ((>= size (* 1024 1024 1024))
+        (format " (%0.2fGB)" (/ size (* 1024 1024 1024.0))))
+       ((>= size (* 1024 1024))
+        (format " (%0.2fMB)" (/ size (* 1024 1024.0))))
+       ((>= size 1024)
+        (format " (%0.2fKB)" (/ size 1024.0))))
+       (cond
+       ((>= speed (* 1024 1024 1024))
+        (format "%0.2f GB/s" (/ speed (* 1024 1024 1024.0))))
+       ((>= speed (* 1024 1024))
+        (format "%0.2f MB/s" (/ speed (* 1024 1024.0))))
+       ((>= speed 1024)
+        (format "%0.2f KB/s" (/ speed 1024.0)))
+       (otherwise
+        (format "%0.2f B/s" speed)))))))
 
 (eicq-do-in-sxemacs
  (defregexp eicq-curl-filename-regexp (concat eicq-emphasis-url-regexp 



<Prev in Thread] Current Thread [Next in Thread>
  • Summary for eicq--main--0.9.1--patch-39, Steve Youngs <=