From 878d4174248711906cfaf4e7bf10c0bf83af85f3 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Tue, 10 Oct 2023 11:04:14 -0700 Subject: Move man-related files to docs directory --- MANIFEST.in | 1 + Makefile | 6 --- docs/Makefile | 6 +++ docs/wikiget.1 | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/wikiget.1.md | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- wikiget.1 | 122 ------------------------------------------------------ wikiget.1.md | 116 --------------------------------------------------- 8 files changed, 246 insertions(+), 245 deletions(-) delete mode 100644 Makefile create mode 100644 docs/Makefile create mode 100644 docs/wikiget.1 create mode 100644 docs/wikiget.1.md delete mode 100644 wikiget.1 delete mode 100644 wikiget.1.md diff --git a/MANIFEST.in b/MANIFEST.in index a24252d..429c6c8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ graft src graft tests +graft docs global-exclude *.py[cod] diff --git a/Makefile b/Makefile deleted file mode 100644 index 6ce62df..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -.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/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..6ce62df --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,6 @@ +.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/docs/wikiget.1 b/docs/wikiget.1 new file mode 100644 index 0000000..03a0c41 --- /dev/null +++ b/docs/wikiget.1 @@ -0,0 +1,122 @@ +.\" Automatically generated by Pandoc 3.1.8 +.\" +.TH "WIKIGET" "1" "October 5, 2023" "Version 0.5.1" "Wikiget User Manual" +.SH NAME +wikiget - download files from MediaWiki sites +.SH SYNOPSIS +.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 +the URL of its description page. +.SH OPTIONS +.TP +\f[I]FILE\f[R] +The file to be downloaded. +If \f[I]FILE\f[R] is in the form \f[I]File:Example.jpg\f[R] or +\f[I]Image:Example.jpg\f[R], it will be fetched from the default site, +which is \[lq]commons.wikimedia.org\[rq]. +If it\[cq]s the fully-qualified URL of a file description page, like +\f[I]https://en.wikipedia.org/wiki/File:Example.jpg\f[R], the file is +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] +parameter. +.TP +-\f[B]P\f[R], --\f[B]path\f[R] \f[I]PATH\f[R] +Script path for the wiki, where \[lq]index.php\[rq] and +\[lq]api.php\[rq] live. +On Wikimedia sites, it\[cq]s \[lq]/w/\[rq], the default, but other sites +may use \[lq]/\[rq] or something else entirely. +.TP +-\f[B]u\f[R], --\f[B]username\f[R] \f[I]USERNAME\f[R] +Username for private wikis that require a login even for read access. +.TP +-\f[B]p\f[R], --\f[B]password\f[R] \f[I]PASSWORD\f[R] +Password for private wikis that require a login even for read access. +.TP +-\f[B]o\f[R], --\f[B]output\f[R] \f[I]OUTPUT\f[R] +By default, the output filename is the same as the remote filename +(without the File: or Image: prefix), but this can be changed with this +option. +.TP +-\f[B]l\f[R], --\f[B]logfile\f[R] \f[I]LOGFILE\f[R] +Specify a logfile, which will contain detailed information about the +download process. +If the logfile already exists, new log information is appended to it. +.TP +-\f[B]f\f[R], --\f[B]force\f[R] +Force existing files to be overwritten. +.TP +-\f[B]a\f[R], --\f[B]batch\f[R] +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. +Additional invocations will increase the level of detail. +.TP +-\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 +.IP +.EX +wikiget File:Example.jpg +wikiget --site en.wikipedia.org File:Example.jpg +wikiget https://en.wikipedia.org/wiki/File:Example.jpg -o test.jpg +.EE +.SH BUG REPORTS +https://github.com/clpo13/wikiget/issues +.SH LICENSE +Copyright (C) 2018-2023 Cody Logan and contributors +.PP +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation, either version 3 of the License, or (at your +option) any later version. +.PP +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU General Public License for more details. +.PP +You should have received a copy of the GNU General Public License along +with this program. +If not, see https://www.gnu.org/licenses/. +.SH AUTHORS +Cody Logan . diff --git a/docs/wikiget.1.md b/docs/wikiget.1.md new file mode 100644 index 0000000..45184f4 --- /dev/null +++ b/docs/wikiget.1.md @@ -0,0 +1,116 @@ +% WIKIGET(1) Version 0.5.1 | Wikiget User Manual +% Cody Logan +% October 5, 2023 + +# NAME + +wikiget - download files from MediaWiki sites + +# SYNOPSIS + +| **wikiget** \[*options*] *FILE* +| **wikiget** \[*options*] \[\-**a**|\-\-**batch**] *BATCHFILE* +| **wikiget** \[\-**V**|\-\-**version**] +| **wikiget** \[\-**h**|\-\-**help**] + +# DESCRIPTION + +Something like **wget**(1) for downloading a file from MediaWiki sites (like Wikipedia or Wikimedia Commons) using only +the file name or the URL of its description page. + +# OPTIONS + +*FILE* + +: The file to be downloaded. If *FILE* is in the form *File:Example.jpg* or *Image:Example.jpg*, it will be fetched + from the default site, which is "commons.wikimedia.org". If it's the fully-qualified URL of a file 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. + +\-**P**, \-\-**path** *PATH* + +: Script path for the wiki, where "index.php" and "api.php" live. On Wikimedia sites, it's "/w/", the default, but + other sites may use "/" or something else entirely. + +\-**u**, \-\-**username** *USERNAME* + +: Username for private wikis that require a login even for read access. + +\-**p**, \-\-**password** *PASSWORD* + +: Password for private wikis that require a login even for read access. + +\-**o**, \-\-**output** *OUTPUT* + +: By default, the output filename is the same as the remote filename (without the File: or Image: prefix), but this + can be changed with this option. + +\-**l**, \-\-**logfile** *LOGFILE* + +: Specify a logfile, which will contain detailed information about the download process. If the logfile already + exists, new log information is appended to it. + +\-**f**, \-\-**force** + +: Force existing files to be overwritten. + +\-**a**, \-\-**batch** + +: 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 + increase the level of detail. + +\-**q**, \-\-**quiet** + +: Silence warnings and minimize printed output. + +\-**V**, \-\-**version** + +: Print the version number of the program. + +\-**h**, \-\-**help** + +: Print a brief summary of these options. + +# EXAMPLES + +``` +wikiget File:Example.jpg +wikiget --site en.wikipedia.org File:Example.jpg +wikiget https://en.wikipedia.org/wiki/File:Example.jpg -o test.jpg +``` + +# BUG REPORTS + +https://github.com/clpo13/wikiget/issues + +# LICENSE + +Copyright (C) 2018-2023 Cody Logan and contributors + +This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public +License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied +warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see +https://www.gnu.org/licenses/. diff --git a/pyproject.toml b/pyproject.toml index 8dc16ce..e8c63d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ exclude = [ ] [tool.hatch.build.targets.wheel.shared-data] -"wikiget.1" = "share/man/man1/wikiget.1" +"docs/wikiget.1" = "share/man/man1/wikiget.1" "README.md" = "share/doc/wikiget/README.md" "LICENSE" = "share/doc/wikiget/LICENSE" diff --git a/wikiget.1 b/wikiget.1 deleted file mode 100644 index 03a0c41..0000000 --- a/wikiget.1 +++ /dev/null @@ -1,122 +0,0 @@ -.\" Automatically generated by Pandoc 3.1.8 -.\" -.TH "WIKIGET" "1" "October 5, 2023" "Version 0.5.1" "Wikiget User Manual" -.SH NAME -wikiget - download files from MediaWiki sites -.SH SYNOPSIS -.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 -the URL of its description page. -.SH OPTIONS -.TP -\f[I]FILE\f[R] -The file to be downloaded. -If \f[I]FILE\f[R] is in the form \f[I]File:Example.jpg\f[R] or -\f[I]Image:Example.jpg\f[R], it will be fetched from the default site, -which is \[lq]commons.wikimedia.org\[rq]. -If it\[cq]s the fully-qualified URL of a file description page, like -\f[I]https://en.wikipedia.org/wiki/File:Example.jpg\f[R], the file is -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] -parameter. -.TP --\f[B]P\f[R], --\f[B]path\f[R] \f[I]PATH\f[R] -Script path for the wiki, where \[lq]index.php\[rq] and -\[lq]api.php\[rq] live. -On Wikimedia sites, it\[cq]s \[lq]/w/\[rq], the default, but other sites -may use \[lq]/\[rq] or something else entirely. -.TP --\f[B]u\f[R], --\f[B]username\f[R] \f[I]USERNAME\f[R] -Username for private wikis that require a login even for read access. -.TP --\f[B]p\f[R], --\f[B]password\f[R] \f[I]PASSWORD\f[R] -Password for private wikis that require a login even for read access. -.TP --\f[B]o\f[R], --\f[B]output\f[R] \f[I]OUTPUT\f[R] -By default, the output filename is the same as the remote filename -(without the File: or Image: prefix), but this can be changed with this -option. -.TP --\f[B]l\f[R], --\f[B]logfile\f[R] \f[I]LOGFILE\f[R] -Specify a logfile, which will contain detailed information about the -download process. -If the logfile already exists, new log information is appended to it. -.TP --\f[B]f\f[R], --\f[B]force\f[R] -Force existing files to be overwritten. -.TP --\f[B]a\f[R], --\f[B]batch\f[R] -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. -Additional invocations will increase the level of detail. -.TP --\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 -.IP -.EX -wikiget File:Example.jpg -wikiget --site en.wikipedia.org File:Example.jpg -wikiget https://en.wikipedia.org/wiki/File:Example.jpg -o test.jpg -.EE -.SH BUG REPORTS -https://github.com/clpo13/wikiget/issues -.SH LICENSE -Copyright (C) 2018-2023 Cody Logan and contributors -.PP -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation, either version 3 of the License, or (at your -option) any later version. -.PP -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU General Public License for more details. -.PP -You should have received a copy of the GNU General Public License along -with this program. -If not, see https://www.gnu.org/licenses/. -.SH AUTHORS -Cody Logan . diff --git a/wikiget.1.md b/wikiget.1.md deleted file mode 100644 index 45184f4..0000000 --- a/wikiget.1.md +++ /dev/null @@ -1,116 +0,0 @@ -% WIKIGET(1) Version 0.5.1 | Wikiget User Manual -% Cody Logan -% October 5, 2023 - -# NAME - -wikiget - download files from MediaWiki sites - -# SYNOPSIS - -| **wikiget** \[*options*] *FILE* -| **wikiget** \[*options*] \[\-**a**|\-\-**batch**] *BATCHFILE* -| **wikiget** \[\-**V**|\-\-**version**] -| **wikiget** \[\-**h**|\-\-**help**] - -# DESCRIPTION - -Something like **wget**(1) for downloading a file from MediaWiki sites (like Wikipedia or Wikimedia Commons) using only -the file name or the URL of its description page. - -# OPTIONS - -*FILE* - -: The file to be downloaded. If *FILE* is in the form *File:Example.jpg* or *Image:Example.jpg*, it will be fetched - from the default site, which is "commons.wikimedia.org". If it's the fully-qualified URL of a file 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. - -\-**P**, \-\-**path** *PATH* - -: Script path for the wiki, where "index.php" and "api.php" live. On Wikimedia sites, it's "/w/", the default, but - other sites may use "/" or something else entirely. - -\-**u**, \-\-**username** *USERNAME* - -: Username for private wikis that require a login even for read access. - -\-**p**, \-\-**password** *PASSWORD* - -: Password for private wikis that require a login even for read access. - -\-**o**, \-\-**output** *OUTPUT* - -: By default, the output filename is the same as the remote filename (without the File: or Image: prefix), but this - can be changed with this option. - -\-**l**, \-\-**logfile** *LOGFILE* - -: Specify a logfile, which will contain detailed information about the download process. If the logfile already - exists, new log information is appended to it. - -\-**f**, \-\-**force** - -: Force existing files to be overwritten. - -\-**a**, \-\-**batch** - -: 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 - increase the level of detail. - -\-**q**, \-\-**quiet** - -: Silence warnings and minimize printed output. - -\-**V**, \-\-**version** - -: Print the version number of the program. - -\-**h**, \-\-**help** - -: Print a brief summary of these options. - -# EXAMPLES - -``` -wikiget File:Example.jpg -wikiget --site en.wikipedia.org File:Example.jpg -wikiget https://en.wikipedia.org/wiki/File:Example.jpg -o test.jpg -``` - -# BUG REPORTS - -https://github.com/clpo13/wikiget/issues - -# LICENSE - -Copyright (C) 2018-2023 Cody Logan and contributors - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public -License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later -version. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied -warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with this program. If not, see -https://www.gnu.org/licenses/. -- cgit v1.2.3