Add -v short option.

This commit is contained in:
Bastian Kleineidam 2010-03-06 11:38:29 +01:00
parent 76672e3bfd
commit a2fb1e578f
4 changed files with 10 additions and 11 deletions

View File

@ -46,7 +46,7 @@ first extracting files to a unique (temporary) directory, and
then moving its contents back if possible. This also prevents then moving its contents back if possible. This also prevents
local files from being overwritten by mistake. local files from being overwritten by mistake.
.TP .TP
\fB\-\-verbose\fP \fB\-v\fP, \fB\-\-verbose\fP
Be verbose when extracting (if the helper application supports it). Be verbose when extracting (if the helper application supports it).
.TP .TP
\fB\-\-help\fP \fB\-\-help\fP
@ -54,7 +54,7 @@ Show help for this command.
.SS \fBlist\fP .SS \fBlist\fP
List files in an archive. List files in an archive.
.TP .TP
\fB\-\-verbose\fP \fB\-v\fP, \fB\-\-verbose\fP
Verbose archive listing (if the helper application supports it). Verbose archive listing (if the helper application supports it).
.TP .TP
\fB\-\-help\fP \fB\-\-help\fP
@ -62,7 +62,7 @@ Show help for this command.
.SS \fBcreate\fP .SS \fBcreate\fP
Create an archive from given files. Create an archive from given files.
.\" .TP .\" .TP
.\" \fB\-\-verbose\fP .\" \fB\-v\fP, \fB\-\-verbose\fP
.\" Verbose operation (if the helper application supports it). .\" Verbose operation (if the helper application supports it).
.TP .TP
\fB\-\-help\fP \fB\-\-help\fP
@ -70,7 +70,7 @@ Show help for this command.
.SS \fBtest\fP .SS \fBtest\fP
Test files in an archive. Test files in an archive.
.TP .TP
\fB\-\-verbose\fP \fB\-v\fP, \fB\-\-verbose\fP
Verbose archive testing (if the helper application supports it). Verbose archive testing (if the helper application supports it).
.TP .TP
\fB\-\-help\fP \fB\-\-help\fP

View File

@ -37,7 +37,7 @@ COMMANDS
contents back if possible. This also prevents local files from being contents back if possible. This also prevents local files from being
overwritten by mistake. overwritten by mistake.
--verbose -v, --verbose
Be verbose when extracting (if the helper application supports Be verbose when extracting (if the helper application supports
it). it).
@ -46,7 +46,7 @@ COMMANDS
list list
List files in an archive. List files in an archive.
--verbose -v, --verbose
Verbose archive listing (if the helper application supports it). Verbose archive listing (if the helper application supports it).
--help Show help for this command. --help Show help for this command.
@ -59,7 +59,7 @@ COMMANDS
test test
Test files in an archive. Test files in an archive.
--verbose -v, --verbose
Verbose archive testing (if the helper application supports it). Verbose archive testing (if the helper application supports it).
--help Show help for this command. --help Show help for this command.

View File

@ -1,2 +1 @@
- Add ability to extract multiple archives. - Add ability to extract multiple archives.
- Add short option -v for verbosity.

6
patool
View File

@ -22,7 +22,7 @@ if not hasattr(sys, "version_info") or sys.version_info < (2, 4, 0, "final", 0):
raise SystemExit("This program requires Python 2.4 or later.") raise SystemExit("This program requires Python 2.4 or later.")
from patoolib import handle_archive, list_formats, baker from patoolib import handle_archive, list_formats, baker
@baker.command(default=True, params={ @baker.command(default=True, shortopts={"verbose": "v"}, params={
"verbose": "Be verbose when extracting (if the helper application supports it)." "verbose": "Be verbose when extracting (if the helper application supports it)."
}) })
def extract (archive, verbose=False): def extract (archive, verbose=False):
@ -30,7 +30,7 @@ def extract (archive, verbose=False):
return handle_archive(archive, 'extract') return handle_archive(archive, 'extract')
@baker.command(params={ @baker.command(shortopts={"verbose": "v"}, params={
"verbose": "Verbose archive listing (if the helper application supports it).", "verbose": "Verbose archive listing (if the helper application supports it).",
}) })
def list (archive, verbose=False): def list (archive, verbose=False):
@ -44,7 +44,7 @@ def create (archive, *args):
return handle_archive(archive, 'create', *args) return handle_archive(archive, 'create', *args)
@baker.command(params={ @baker.command(shortopts={"verbose": "v"}, params={
"verbose": "Verbose operation (if the helper application supports it).", "verbose": "Verbose operation (if the helper application supports it).",
}) })
def test (archive, verbose=False): def test (archive, verbose=False):