From 1b23e0c111090fdde8de597465bbbdde48fe24ce Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 24 Jan 2013 07:53:34 +0100 Subject: [PATCH] Document parallel download option with xargs. --- doc/README.txt | 5 +++++ doc/changelog.txt | 2 ++ doc/dosage.1 | 9 ++++++++- doc/dosage.1.html | 13 ++++++++++++- doc/dosage.txt | 8 +++++++- 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/doc/README.txt b/doc/README.txt index acaaae239..88391f292 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -53,6 +53,11 @@ strip of all of them: `$ dosage @` +On Unix, ``xargs`` can download several comic strips in parallel, +for example using up to 4 processes: + +`$ cd Comics && find . -type d | xargs -n1 -P4 dosage -b . -v` + For advanced options and features execute `dosage -h` or look at the dosage manual page. diff --git a/doc/changelog.txt b/doc/changelog.txt index 7071f05d8..2e067dc58 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -5,6 +5,8 @@ Features: - comics: Added PandyLand comic strip. - comics: Added all comic strips from Arcamax (eg. including Hagar the horrible). +- documentation: Document parallel download option with xargs + on Unix systems. Changes: - comics: CyanideAndHappiness image filename now has the strip number prefixed. diff --git a/doc/dosage.1 b/doc/dosage.1 index a123e0e3e..71812de0d 100644 --- a/doc/dosage.1 +++ b/doc/dosage.1 @@ -128,11 +128,18 @@ Retrieve the Penny Arcade strip for a given index: .RS .B dosage pennyarcade:2004\-07\-22 .RE +.PP Retrieve Calvin and Hobbes strips from a given index going backwards to -the beginning until an existing file is found: +the beginning. .RS .B dosage \-a calvinandhobbes:20120722 .RE +.PP +On Unix, \fBxargs(1)\fP can download several comic strips in parallel, +for example using up to 4 processes: +.RS +.B cd Comics && find . -type d | xargs -n1 -P4 dosage -b . -v +.RE .SH ENVIRONMENT .IP HTTP_PROXY .B mainline diff --git a/doc/dosage.1.html b/doc/dosage.1.html index 3f4c8b3d9..468869cc1 100644 --- a/doc/dosage.1.html +++ b/doc/dosage.1.html @@ -177,13 +177,24 @@ Retrieve the Penny Arcade strip for a given index: +

+ Retrieve Calvin and Hobbes strips from a given index going backwards to -the beginning until an existing file is found: +the beginning.

dosage -a calvinandhobbes:20120722
+

+ +On Unix, xargs(1) can download several comic strips in parallel, +for example using up to 4 processes: +

+cd Comics && find . -type d | xargs -n1 -P4 dosage -b . -v + +
+  

ENVIRONMENT

diff --git a/doc/dosage.txt b/doc/dosage.txt index 016a2706b..41dc22b79 100644 --- a/doc/dosage.txt +++ b/doc/dosage.txt @@ -114,10 +114,16 @@ EXAMPLES Retrieve the Penny Arcade strip for a given index: dosage pennyarcade:2004-07-22 + Retrieve Calvin and Hobbes strips from a given index going - backwards to the beginning until an existing file is found: + backwards to the beginning. dosage -a calvinandhobbes:20120722 + On Unix, xargs(1) can download several comic strips in paral‐ + lel, for example using up to 4 processes: + cd Comics && find . -type d | xargs -n1 -P4 dosage -b . + -v + ENVIRONMENT HTTP_PROXY mainline will use the specified HTTP proxy when down‐