aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Logan <clpo13@gmail.com>2023-10-05 15:27:46 -0700
committerCody Logan <clpo13@gmail.com>2023-10-06 13:56:16 -0700
commit0f45fe2526d7be48d77ef60b7505a196d533b4f4 (patch)
treef66b662ecdc1234e0b8a00caabca861a3b5c1acd
parent43c1fc258499f54977a1b7b594b295c2dae03114 (diff)
downloadwikiget-0f45fe2526d7be48d77ef60b7505a196d533b4f4.tar.gz
wikiget-0f45fe2526d7be48d77ef60b7505a196d533b4f4.zip
Add new options to readme and man page
-rw-r--r--README.md8
-rw-r--r--wikiget.19
-rw-r--r--wikiget.1.md10
3 files changed, 22 insertions, 5 deletions
diff --git a/README.md b/README.md
index 9bf9250..4faadf4 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Requires Python 3.7+. Get it with `pip install --user wikiget` or `pipx install
## Usage
-`wikiget [-h] [-V] [-q | -v] [-f] [-s SITE] [-P PATH] [-u USERNAME] [-p PASSWORD] [-o OUTPUT | -a] [-l LOGFILE] FILE`
+`wikiget [-h] [-V] [-q | -v] [-f] [-s SITE] [-P PATH] [-u USERNAME] [-p PASSWORD] [-o OUTPUT | -a] [-l LOGFILE] [-j THREADS] FILE`
The only required parameter is `FILE`, which is the file you want to download. It can either be the name of the file on
the wiki, including the namespace prefix, or a link to the file description page. If `FILE` is in the form
@@ -36,7 +36,10 @@ By default, the program won't overwrite existing files with the same name as the
Files can be batch downloaded with the `-a` or `--batch` flag. In this mode, `FILE` will be treated as an input file
containing multiple files to download, one filename or URL per line. If an error is encountered, execution stops
-immediately and the offending filename is printed.
+immediately and the offending filename is printed. For large batches, the process can be sped up by downloading files
+in parallel. The number of parallel downloads can be set with `-j`. For instance, with `-a -j4`, wikiget will download
+four files at once. Without `-j` or with `-j` by itself without a number, wikiget will download the files one at a
+time.
### Example usage
@@ -48,7 +51,6 @@ wikiget https://en.wikipedia.org/wiki/File:Example.jpg -o test.jpg
## Future plans
-- download multiple files at once in batch mode
- continue batch download even if input is malformed or file doesn't exist
(possibly by raising exceptions in `download()`)
- batch download by (Commons) category or user uploads
diff --git a/wikiget.1 b/wikiget.1
index 060fd54..03a0c41 100644
--- a/wikiget.1
+++ b/wikiget.1
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 3.1.8
.\"
-.TH "WIKIGET" "1" "October 3, 2023" "Version 0.5.1" "Wikiget User Manual"
+.TH "WIKIGET" "1" "October 5, 2023" "Version 0.5.1" "Wikiget User Manual"
.SH NAME
wikiget - download files from MediaWiki sites
.SH SYNOPSIS
@@ -76,6 +76,10 @@ Force existing files to be overwritten.
If this flag is set, \f[B]wikiget\f[R] will run in batch download mode
(see \f[I]BATCHFILE\f[R]).
.TP
+-\f[B]j\f[R], --\f[B]threads\f[R]
+Number of parallel downloads to attempt in batch mode.
+This option has no effect if -\f[B]a\f[R] is not also set.
+.TP
-\f[B]v\f[R], --\f[B]verbose\f[R]
Print additional information, such as the site used and the full URL of
the file.
@@ -84,6 +88,9 @@ Additional invocations will increase the level of detail.
-\f[B]q\f[R], --\f[B]quiet\f[R]
Silence warnings and minimize printed output.
.TP
+-\f[B]V\f[R], --\f[B]version\f[R]
+Print the version number of the program.
+.TP
-\f[B]h\f[R], --\f[B]help\f[R]
Print a brief summary of these options.
.SH EXAMPLES
diff --git a/wikiget.1.md b/wikiget.1.md
index d05aaf1..45184f4 100644
--- a/wikiget.1.md
+++ b/wikiget.1.md
@@ -1,6 +1,6 @@
% WIKIGET(1) Version 0.5.1 | Wikiget User Manual
% Cody Logan <clpo13@gmail.com>
-% October 3, 2023
+% October 5, 2023
# NAME
@@ -68,6 +68,10 @@ the file name or the URL of its description page.
: If this flag is set, **wikiget** will run in batch download mode (see *BATCHFILE*).
+\-**j**, \-\-**threads**
+
+: Number of parallel downloads to attempt in batch mode. This option has no effect if \-**a** is not also set.
+
\-**v**, \-\-**verbose**
: Print additional information, such as the site used and the full URL of the file. Additional invocations will
@@ -77,6 +81,10 @@ the file name or the URL of its description page.
: Silence warnings and minimize printed output.
+\-**V**, \-\-**version**
+
+: Print the version number of the program.
+
\-**h**, \-\-**help**
: Print a brief summary of these options.