From c0308e1ea4c6be54ff9c07c33613140e8a3ea4ec Mon Sep 17 00:00:00 2001
From: Tatsuhiro Tsujikawa
Date: Sun, 17 Jan 2010 07:23:53 +0000
Subject: [PATCH] 2010-01-17 Tatsuhiro Tsujikawa
Added --human-readable option. This option, when true is given,
prints sizes and speed in human readable format(e.g., 1.2Ki,
3.4Mi) in the console readout. The default value is true and it
looks exactly the same as aria2-1.8.0. So the 'new feature'
appears when false is given. In this case, sizes and speed are
printed without in bytes. No Ki, Mi units conversion is used.
This may be useful for a program to parse the output of aria2.
* doc/aria2c.1.txt
* src/ConsoleStatCalc.cc
* src/ConsoleStatCalc.h
* src/OptionHandlerFactory.cc
* src/main.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
---
ChangeLog | 18 +++++++++++++
doc/aria2c.1 | 10 +++++--
doc/aria2c.1.html | 11 +++++++-
doc/aria2c.1.txt | 5 ++++
src/ConsoleStatCalc.cc | 54 +++++++++++++++++++++++--------------
src/ConsoleStatCalc.h | 33 ++++++++++++++++++++++-
src/OptionHandlerFactory.cc | 9 +++++++
src/main.cc | 3 ++-
src/prefs.cc | 2 ++
src/prefs.h | 2 ++
src/usage_text.h | 3 +++
11 files changed, 125 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 87f10435..11477d50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-17 Tatsuhiro Tsujikawa
+
+ Added --human-readable option. This option, when true is given,
+ prints sizes and speed in human readable format(e.g., 1.2Ki,
+ 3.4Mi) in the console readout. The default value is true and it
+ looks exactly the same as aria2-1.8.0. So the 'new feature'
+ appears when false is given. In this case, sizes and speed are
+ printed without in bytes. No Ki, Mi units conversion is used.
+ This may be useful for a program to parse the output of aria2.
+ * doc/aria2c.1.txt
+ * src/ConsoleStatCalc.cc
+ * src/ConsoleStatCalc.h
+ * src/OptionHandlerFactory.cc
+ * src/main.cc
+ * src/prefs.cc
+ * src/prefs.h
+ * src/usage_text.h
+
2010-01-15 Tatsuhiro Tsujikawa
Now --all-proxy, --http-proxy, --https-proxy and --ftp-proxy
diff --git a/doc/aria2c.1 b/doc/aria2c.1
index ba39d9b2..41054f20 100644
--- a/doc/aria2c.1
+++ b/doc/aria2c.1
@@ -2,12 +2,12 @@
.\" Title: aria2c
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2
-.\" Date: 01/15/2010
+.\" Date: 01/17/2010
.\" Manual: Aria2 Manual
.\" Source: Aria2
.\" Language: English
.\"
-.TH "ARIA2C" "1" "01/15/2010" "Aria2" "Aria2 Manual"
+.TH "ARIA2C" "1" "01/17/2010" "Aria2" "Aria2 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -967,6 +967,12 @@ Default:
\fIprealloc\fR
.RE
.PP
+\fB\-\-human\-readable\fR[=\fItrue\fR|\fIfalse\fR]
+.RS 4
+Print sizes and speed in human readable format (e\&.g\&., 1\&.2Ki, 3\&.4Mi) in the console readout\&. Default:
+\fItrue\fR
+.RE
+.PP
\fB\-\-interface\fR=INTERFACE
.RS 4
Bind sockets to given interface\&. You can specify interface name, IP address and hostname\&. Possible Values: interface, IP address, hostname
diff --git a/doc/aria2c.1.html b/doc/aria2c.1.html
index 11d530b5..3785fd4f 100644
--- a/doc/aria2c.1.html
+++ b/doc/aria2c.1.html
@@ -1773,6 +1773,15 @@ writes the piece to the appropriate files.
+--human-readable[=true|false]
+
+
+
+ Print sizes and speed in human readable format (e.g., 1.2Ki, 3.4Mi)
+ in the console readout. Default: true
+
+
+
--interface=INTERFACE
@@ -3578,7 +3587,7 @@ files in the program, then also delete it here.