Document the --outdir option.

This commit is contained in:
Bastian Kleineidam 2012-04-09 11:56:35 +02:00
parent 822b650c79
commit 9904c8872d
4 changed files with 47 additions and 37 deletions

View File

@ -1,5 +1,8 @@
0.16 "" (released xx.xx.2012)
* Document the --outdir option for the extract command.
Closes: SF Bug #3363964
0.15 "Contraband" (released 8.4.2012)
* Print help when unknown options are given.

View File

@ -1,5 +1,5 @@
.\" -*- nroff -*-
.\" Copyright (C) 2010-2011 Bastian Kleineidam
.\" Copyright (C) 2010-2012 Bastian Kleineidam
.\"
.\" 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
@ -15,8 +15,9 @@
.SH NAME
patool - portable command line archive file manager
.SH SYNOPSIS
\fBpatool\fP (\fBextract\fP|\fBlist\fP|\fBtest\fP) [\fI\-\-verbose\fP] <\fIarchive-file\fP>...
\fBpatool\fP \fBcreate\fP [\fI\-\-verbose\fP] <\fIarchive-file\fP> [\fIfiles\fP...]
\fBpatool\fP (\fBlist\fP|\fBtest\fP) [\fB\-\-verbose\fP] <\fIarchive-file\fP>...
\fBpatool\fP \fBextract\fP [\fB\-\-verbose\fP] [\fB\-\-outdir=\fP\fIDIRNAME\fP] <\fIarchive-file\fP>...
\fBpatool\fP \fBcreate\fP [\fB\-\-verbose\fP] <\fIarchive-file\fP> [\fIfiles\fP...]
\fBpatool\fP \fBdiff\fP <\fIarchive1\fP> <\fIarchive2\fP>
\fBpatool\fP \fBrepack\fP <\fIarchive1\fP> <\fIarchive2\fP>
\fBpatool\fP \fBformats\fP
@ -102,4 +103,4 @@ For example:
.SH AUTHOR
Bastian Kleineidam <calvin@users.sourceforge.net>
.SH COPYRIGHT
Copyright \(co 2010-2011 Bastian Kleineidam
Copyright \(co 2010-2012 Bastian Kleineidam

View File

@ -6,7 +6,9 @@ NAME
patool - portable command line archive file manager
SYNOPSIS
patool (extract|list|test) [--verbose] <archive-file>...
patool (list|test) [--verbose] <archive-file>...
patool extract [--verbose] [--outdir=DIRNAME] <archive-
file>...
patool create [--verbose] <archive-file> [files...]
patool diff <archive1> <archive2>
patool repack <archive1> <archive2>
@ -23,12 +25,12 @@ DESCRIPTION
patool supports 7z (.7z), ACE (.ace), ALZIP (.alz), AR (.a),
ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB (.cab), compress
(.Z), CPIO (.cpio), DEB (.deb), GZIP (.gz), LRZIP (.lrz), LZH
(.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM
(.rpm), RAR (.rar), RZIP (.rz), TAR (.tar), XZ (.xz), ZIP
(.zip, .jar) and ZOO (.zoo) formats. It relies on helper
applications to handle those archive formats (for example bzip2
for BZIP2 archives).
(.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), GZIP (.gz), LRZIP
(.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP
(.lzo), RPM (.rpm), RAR (.rar), RZIP (.rz), TAR (.tar), XZ
(.xz), ZIP (.zip, .jar) and ZOO (.zoo) formats. It relies on
helper applications to handle those archive formats (for exam
ple bzip2 for BZIP2 archives).
EXAMPLES
patool extract archive.zip otherarchive.rar
@ -109,7 +111,7 @@ AUTHOR
Bastian Kleineidam <calvin@users.sourceforge.net>
COPYRIGHT
Copyright © 2010 Bastian Kleineidam
Copyright © 2010-2012 Bastian Kleineidam

6
patool
View File

@ -46,7 +46,11 @@ def handle_multi_archive(archives, cmd, **kwargs):
return res
@baker.command(default=True, shortopts=shortopts, params=params)
extract_params = {
"outdir": "Extract to given directory.",
}
extract_params.update(params)
@baker.command(default=True, shortopts=shortopts, params=extract_params)
def extract (archive, *archives, **kwargs):
"""Extract files from archive(s)."""
return handle_multi_archive((archive,)+archives, 'extract', **kwargs)