aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Logan <clpo13@gmail.com>2023-10-02 10:30:53 -0700
committerCody Logan <clpo13@gmail.com>2023-10-02 10:30:53 -0700
commit32bceeefb667b1966956b49981d256359afe0177 (patch)
tree4ce0676814cdf1cc028daeb205e40ccff73af033
parent62b815f0fa083b8336f8ac36225fe0ba9838d202 (diff)
downloadwikiget-32bceeefb667b1966956b49981d256359afe0177.tar.gz
wikiget-32bceeefb667b1966956b49981d256359afe0177.zip
Update man page with alternate invocations
-rw-r--r--Makefile8
-rw-r--r--wikiget.134
-rw-r--r--wikiget.1.md19
3 files changed, 41 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index bac4200..6ce62df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,6 @@
-man: wikiget.1.md
- pandoc -f markdown -t man -o wikiget.1 -s wikiget.1.md
+.PHONY: man
+
+man: wikiget.1
+
+wikiget.1: wikiget.1.md
+ pandoc -s -f markdown -t man -o wikiget.1 wikiget.1.md
diff --git a/wikiget.1 b/wikiget.1
index b4c9255..c5dc933 100644
--- a/wikiget.1
+++ b/wikiget.1
@@ -4,11 +4,21 @@
.SH NAME
wikiget - download files from MediaWiki sites
.SH SYNOPSIS
-\f[B]wikiget\f[R] [-\f[B]h\f[R]] [-\f[B]V\f[R]]
-[-\f[B]q\f[R]|-\f[B]v\f[R]] [-\f[B]f\f[R]] [-\f[B]s\f[R] \f[I]SITE\f[R]]
-[-\f[B]p\f[R] \f[I]PATH\f[R]] [--\f[B]username\f[R] \f[I]USERNAME\f[R]]
-[--\f[B]password\f[R] \f[I]PASSWORD\f[R]] [-\f[B]o\f[R] \f[I]OUTPUT\f[R]
-| -\f[B]a\f[R]] [-\f[B]l\f[R] \f[I]LOGFILE\f[R]] \f[I]FILE\f[R]
+.PP
+\f[B]wikiget\f[R] [\f[I]options\f[R]] \f[I]FILE\f[R]
+.PD 0
+.P
+.PD
+\f[B]wikiget\f[R] [\f[I]options\f[R]] [-\f[B]a\f[R]|--\f[B]batch\f[R]]
+\f[I]BATCHFILE\f[R]
+.PD 0
+.P
+.PD
+\f[B]wikiget\f[R] [-\f[B]V\f[R]|--\f[B]version\f[R]]
+.PD 0
+.P
+.PD
+\f[B]wikiget\f[R] [-\f[B]h\f[R]|--\f[B]help\f[R]]
.SH DESCRIPTION
Something like \f[B]wget\f[R](1) for downloading a file from MediaWiki
sites (like Wikipedia or Wikimedia Commons) using only the file name or
@@ -25,6 +35,13 @@ If it\[cq]s the fully-qualified URL of a file description page, like
fetched from the site in the URL, in this case
\[lq]en.wikipedia.org\[rq].
.TP
+\f[I]BATCHFILE\f[R]
+In batch download mode (activated with -\f[B]a\f[R] or
+--\f[B]batch\f[R]), this is a text file containing multiple file names
+or URLs to be downloaded, one per line.
+If an error is encountered during download, execution stops immediately
+and the offending filename is printed.
+.TP
-\f[B]s\f[R], --\f[B]site\f[R] \f[I]SITE\f[R]
MediaWiki site to download from.
Will not have any effect if the full URL is given in the \f[I]FILE\f[R]
@@ -56,11 +73,8 @@ If the logfile already exists, new log information is appended to it.
Force overwritng of existing files.
.TP
-\f[B]a\f[R], --\f[B]batch\f[R]
-If this flag is set, \f[I]FILE\f[R] will be treated as an input text
-file containing multiple files to be downloaded, one filename or URL per
-line.
-If an error is encountered during download, execution stops immediately
-and the offending filename is printed.
+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]v\f[R], --\f[B]verbose\f[R]
Print additional information, such as the site used and the full URL of
diff --git a/wikiget.1.md b/wikiget.1.md
index 01dcd5e..11ab708 100644
--- a/wikiget.1.md
+++ b/wikiget.1.md
@@ -8,11 +8,10 @@ wikiget - download files from MediaWiki sites
# SYNOPSIS
-**wikiget**
-[\-**h**] [\-**V**] [\-**q**|\-**v**] [\-**f**] [\-**s** *SITE*] [\-**p** *PATH*]
-[\-\-**username** *USERNAME*] [\-\-**password** *PASSWORD*]
-[\-**o** *OUTPUT* | \-**a**] [\-**l** *LOGFILE*]
-*FILE*
+| **wikiget** \[*options*] *FILE*
+| **wikiget** \[*options*] \[\-**a**|\-\-**batch**] *BATCHFILE*
+| **wikiget** \[\-**V**|\-\-**version**]
+| **wikiget** \[\-**h**|\-\-**help**]
# DESCRIPTION
@@ -28,6 +27,12 @@ using only the file name or the URL of its description page.
description page, like *https://en.wikipedia.org/wiki/File:Example.jpg*, the file is fetched from the site
in the URL, in this case "en.wikipedia.org".
+*BATCHFILE*
+
+: In batch download mode (activated with \-**a** or \-\-**batch**), this is a text file containing multiple
+ file names or URLs to be downloaded, one per line. If an error is encountered during download, execution
+ stops immediately and the offending filename is printed.
+
\-**s**, \-\-**site** *SITE*
: MediaWiki site to download from. Will not have any effect if the full URL is given in the *FILE* parameter.
@@ -61,9 +66,7 @@ using only the file name or the URL of its description page.
\-**a**, \-\-**batch**
-: If this flag is set, *FILE* will be treated as an input text file containing multiple files to be downloaded,
- one filename or URL per line. If an error is encountered during download, execution stops immediately and the
- offending filename is printed.
+: If this flag is set, **wikiget** will run in batch download mode (see *BATCHFILE*).
\-**v**, \-\-**verbose**