diff --git a/COPYING b/COPYING index 4432540..f288702 100644 --- a/COPYING +++ b/COPYING @@ -1,12 +1,11 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. @@ -69,7 +68,7 @@ patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. - TERMS AND CONDITIONS + TERMS AND CONDITIONS 0. Definitions. @@ -77,7 +76,7 @@ modification follow. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - + "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. @@ -510,7 +509,7 @@ actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - + If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties @@ -619,9 +618,9 @@ an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -646,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. 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 . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -665,12 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. - +. diff --git a/Makefile b/Makefile index 4f10065..279b141 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ update_webmeta: git cm "Updated web meta data." homepage: update_webmeta -# relase website +# release website $(MAKE) -C doc/web release tag: diff --git a/doc/README.txt b/doc/README.txt index 8aa3a9a..b8e1ac6 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -8,15 +8,15 @@ searched, repacked and compared with patool. The advantage of patool is its simplicity in handling archive files without having to remember a myriad of programs and options. -The archive format is determined by the file(1) program and as +The archive format is determined by the file(1) program and as a fallback by the archive file extension. patool supports 7z (.7z, .cb7), ACE (.ace, .cba), ADF (.adf), ALZIP (.alz), -APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), -CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), -FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), +APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), +CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), +FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr), -RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz), +RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz), ZIP (.zip, .jar, .cbz) and ZOO (.zoo) archive formats. It relies on helper applications to handle those archive formats (for example bzip2 for BZIP2 archives). @@ -57,7 +57,7 @@ patool repack linux-2.6.33.tar.gz linux-2.6.33.tar.bz2 Website -------- -See http://wummel.github.io/patool/ for more info and downloads. +See https://wummel.github.io/patool/ for more info and downloads. API ---- diff --git a/doc/development.txt b/doc/development.txt index 8640a23..5504282 100644 --- a/doc/development.txt +++ b/doc/development.txt @@ -33,23 +33,23 @@ General rules for all convenience functions: The convenience functions are: * ``def extract_archive(archive, verbosity=0, outdir=None, program=None)`` - + Extracts the given archive filename to the current working directory or if specified to the given directory name in outdir. Checks that the archive exists and is readable before extracting it. * ``def list_archive(archive, verbosity=1, program=None)`` - + Lists the contents of the given archive filename on stdout. Checks that the archive exists and is readable before listing it. * ``def test_archive(archive, verbosity=0, program=None)`` - + Tests the given archive filename. Checks that the archive exists and is readable before testing it. * ``def create_archive(archive, filenames, verbosity=0, program=None)`` - + Creates a new archive. The type of archive is determined by the archive filename extension. Checks that the archive is not already existing to avoid overwriting it. @@ -57,7 +57,7 @@ The convenience functions are: and are readable. * ``diff_archives(archive1, archive2, verbosity=0)`` - + This function lists differences in the content of the two archives. Both archives are extracted and the contents are compared recursively with the diff(1) program. @@ -70,7 +70,7 @@ The convenience functions are: Checks that archive exists and is readable. * ``repack_archive (archive, archive_new, verbosity=0)`` - + This function extracts the contents of the archive and packs them into archive_new. Checks that archive exists and is readable. Also checks that diff --git a/doc/install.txt b/doc/install.txt index 00f9fe1..2e38700 100644 --- a/doc/install.txt +++ b/doc/install.txt @@ -3,8 +3,8 @@ Installation First, install the required software. -1. Python >= 2.7 from http://www.python.org/ - +1. Python >= 2.7 from https://www.python.org/ + Now install the application. @@ -15,20 +15,20 @@ Now install the application. 2. Installation from source a) Installation as root - + Run ``sudo python setup.py install`` to install patool. - + b) Installation as a normal user - + Run ``python setup.py install --home $HOME``. Note that you have - to adjust your PATH and PYTHONPATH environment variables, eg. by + to adjust your PATH and PYTHONPATH environment variables, e.g. by adding the commands ``export PYTHONPATH=$HOME/lib/python`` and ``export PATH=$PATH:$HOME/bin`` to your shell configuration file. - + For more information look at the `Modifying Python's search path`_ documentation. - + .. _Modifying Python's search path: http://docs.python.org/inst/search-path.html#SECTION000410000000000000000 diff --git a/doc/patool.1 b/doc/patool.1 index 67c509c..6f0a6a8 100644 --- a/doc/patool.1 +++ b/doc/patool.1 @@ -56,7 +56,7 @@ of helper applications. Can be given multiple times to increase the output even more. .TP \fB\-\-non\-interactive\fP -Try to prevent any interactive user input (ie. prompting for passwords +Try to prevent any interactive user input (i.e. prompting for passwords or for overwriting duplicate files). Use this option with care since overwriting files or ignoring password prompts could lead to unintended consequences. @@ -72,7 +72,7 @@ The original archive will never be removed. .IP "\(bu" 4 Files outside the output directory will never be created. This relies on archive program options to prevent unpacking of files with an absolute -path name (eg. \fB\-\-no\-absolute\-filenames\fP for \fBcpio(1)\fP). +path name (e.g. \fB\-\-no\-absolute\-filenames\fP for \fBcpio(1)\fP). .PP The following commands are available. .SS extract @@ -138,7 +138,7 @@ not smaller, the archive is left unchanged. .SS formats \fBpatool\fP \fBformats\fP .PP -Show all supported archive formats (ie. which helper applications +Show all supported archive formats (i.e. which helper applications are available). .SH HELP OPTION Specifying the help option displays help for patool itself, or a diff --git a/doc/web/content/index.md b/doc/web/content/index.md index 7e46035..820efbd 100644 --- a/doc/web/content/index.md +++ b/doc/web/content/index.md @@ -4,7 +4,7 @@ slug: index --- Introduction ------------- -[![XKCD Tar comic](http://imgs.xkcd.com/comics/tar.png)](http://xkcd.com/1168/) +[![XKCD Tar comic](https://imgs.xkcd.com/comics/tar.png)](https://xkcd.com/1168/) I could never remember the correct options for all those different compression programs. Tar, unzip, gzip - you name it and I forgot it. diff --git a/doc/web/media/css/print.css b/doc/web/media/css/print.css index 541695b..9f13710 100644 --- a/doc/web/media/css/print.css +++ b/doc/web/media/css/print.css @@ -7,8 +7,8 @@ b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; @@ -19,7 +19,7 @@ time, mark, audio, video { vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } @@ -43,7 +43,7 @@ table { } body { font-size: 13px; - line-height: 1.5; + line-height: 1.5; font-family: 'Helvetica Neue', Helvetica, Arial, serif; color: #000; } @@ -118,14 +118,14 @@ th { td { border: 1px solid #ebebeb; - text-align: center; + text-align: center; font-weight: 300; } form { background: #f2f2f2; padding: 20px; - + } @@ -133,43 +133,43 @@ form { h1 { font-size: 2.8em; -} +} h2 { font-size: 22px; font-weight: bold; color: #303030; margin-bottom: 8px; -} +} h3 { color: #d5000d; font-size: 18px; font-weight: bold; margin-bottom: 8px; -} - +} + h4 { font-size: 16px; color: #303030; font-weight: bold; -} +} h5 { font-size: 1em; color: #303030; -} +} h6 { font-size: .8em; color: #303030; -} +} p { font-weight: 300; margin-bottom: 20px; } - + a { text-decoration: none; } @@ -223,4 +223,4 @@ footer a { .clearfix {display: inline-block;} * html .clearfix {height: 1%;} -.clearfix {display: block;} \ No newline at end of file +.clearfix {display: block;} diff --git a/doc/web/media/css/stylesheet.css b/doc/web/media/css/stylesheet.css index 2a19461..85f6acf 100644 --- a/doc/web/media/css/stylesheet.css +++ b/doc/web/media/css/stylesheet.css @@ -1,4 +1,4 @@ -/* http://meyerweb.com/eric/tools/css/reset/ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ @@ -11,8 +11,8 @@ b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; @@ -23,7 +23,7 @@ time, mark, audio, video { vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } @@ -49,7 +49,7 @@ table { /* LAYOUT STYLES */ body { font-size: 1em; - line-height: 1.5; + line-height: 1.5; background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat; font-family: 'Helvetica Neue', Helvetica, Arial, serif; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); @@ -227,14 +227,14 @@ th { td { border: 1px solid #ebebeb; - text-align: center; + text-align: center; font-weight: 300; } form { background: #f2f2f2; padding: 20px; - + } @@ -242,43 +242,43 @@ form { h1 { font-size: 32px; -} +} h2 { font-size: 22px; font-weight: bold; color: #303030; margin-bottom: 8px; -} +} h3 { color: #d5000d; font-size: 18px; font-weight: bold; margin-bottom: 8px; -} - +} + h4 { font-size: 16px; color: #303030; font-weight: bold; -} +} h5 { font-size: 1em; color: #303030; -} +} h6 { font-size: .8em; color: #303030; -} +} p { font-weight: 300; margin-bottom: 20px; } - + a { text-decoration: none; } diff --git a/patool b/patool index 6e9c83d..bb9466d 100755 --- a/patool +++ b/patool @@ -159,7 +159,7 @@ def create_argparser(): epilog=epilog, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('--verbose', '-v', action='count', default=0, dest='verbosity', help="verbose operation; can be given multiple times") parser.add_argument('--non-interactive', dest='interactive', default=True, action='store_false', - help="don't query for user input (ie. passwords or when overwriting duplicate files); use with care since overwriting files or ignoring passwords could be unintended") + help="don't query for user input (i.e. passwords or when overwriting duplicate files); use with care since overwriting files or ignoring passwords could be unintended") subparsers = parser.add_subparsers(help='the archive command; type "patool COMMAND -h" for command-specific help', dest='command') # extract parser_extract = subparsers.add_parser('extract', help='extract one or more archives') diff --git a/patoolib/__init__.py b/patoolib/__init__.py index 1c2e423..f4a29ba 100644 --- a/patoolib/__init__.py +++ b/patoolib/__init__.py @@ -361,7 +361,7 @@ def check_archive_format (format, compression): if format not in ArchiveFormats: raise util.PatoolError("unknown archive format `%s'" % format) if compression is not None and compression not in ArchiveCompressions: - raise util.PatoolError("unkonwn archive compression `%s'" % compression) + raise util.PatoolError("unknown archive compression `%s'" % compression) def find_archive_program (format, command, program=None, password=None): @@ -546,7 +546,7 @@ def _extract_archive(archive, verbosity=0, interactive=True, outdir=None, cmdlist = get_archive_cmdlist(archive, compression, program, verbosity, interactive, outdir, password=password) if cmdlist: # an empty command list means the get_archive_cmdlist() function - # already handled the command (eg. when it's a builtin Python + # already handled the command (e.g. when it's a builtin Python # function) run_archive_cmdlist(cmdlist, verbosity=verbosity) if do_cleanup_outdir: @@ -583,7 +583,7 @@ def _create_archive(archive, filenames, verbosity=0, interactive=True, cmdlist = get_archive_cmdlist(archive, compression, program, verbosity, interactive, filenames, password=password) if cmdlist: # an empty command list means the get_archive_cmdlist() function - # already handled the command (eg. when it's a builtin Python + # already handled the command (e.g. when it's a builtin Python # function) run_archive_cmdlist(cmdlist, verbosity=verbosity) if origarchive: @@ -605,7 +605,7 @@ def _handle_archive(archive, command, verbosity=0, interactive=True, cmdlist = get_archive_cmdlist(archive, compression, program, verbosity, interactive, password=password) if cmdlist: # an empty command list means the get_archive_cmdlist() function - # already handled the command (eg. when it's a builtin Python + # already handled the command (e.g. when it's a builtin Python # function) run_archive_cmdlist(cmdlist, verbosity=verbosity) @@ -620,7 +620,7 @@ def get_archive_cmdlist_func (program, command, format): module = importlib.import_module(modulename, __name__) except ImportError as msg: raise util.PatoolError(msg) - # get archive handler function (eg. patoolib.programs.star.extract_tar) + # get archive handler function (e.g. patoolib.programs.star.extract_tar) try: archive_cmdlist_func = getattr(module, '%s_%s' % (command, format)) def check_for_password_before_cmdlist_func_call(*args, **kwargs): @@ -723,7 +723,7 @@ def _recompress_archive(archive, verbosity=0, interactive=True, password=None): """Try to recompress an archive to smaller size.""" format, compression = get_archive_format(archive) if compression: - # only recompress the compression itself (eg. for .tar.xz) + # only recompress the compression itself (e.g. for .tar.xz) format = compression tmpdir = util.tmpdir() tmpdir2 = util.tmpdir() diff --git a/patoolib/programs/bsdcpio.py b/patoolib/programs/bsdcpio.py index bbca459..f1d257d 100644 --- a/patoolib/programs/bsdcpio.py +++ b/patoolib/programs/bsdcpio.py @@ -15,4 +15,3 @@ # along with this program. If not, see . """Archive commands for the bsdcpio program.""" from .cpio import extract_cpio, list_cpio, test_cpio, create_cpio - diff --git a/patoolib/programs/lhasa.py b/patoolib/programs/lhasa.py index b7a3e81..4009f11 100644 --- a/patoolib/programs/lhasa.py +++ b/patoolib/programs/lhasa.py @@ -15,4 +15,3 @@ # along with this program. If not, see . """Archive commands for the lhasa program.""" from .lha import extract_lzh - diff --git a/patoolib/programs/p7zip.py b/patoolib/programs/p7zip.py index ee1865a..efb819d 100644 --- a/patoolib/programs/p7zip.py +++ b/patoolib/programs/p7zip.py @@ -29,7 +29,7 @@ def extract_7z(archive, compression, cmd, verbosity, interactive, outdir, passwo return cmdlist def extract_7z_singlefile(archive, compression, cmd, verbosity, interactive, outdir, password=None): - """Extract a singlefile archive (eg. gzip or bzip2) with '7z e'. + """Extract a singlefile archive (e.g. gzip or bzip2) with '7z e'. This makes sure a single file and no subdirectories are created, which would cause errors with patool repack.""" cmdlist = [cmd, 'e'] diff --git a/patoolib/programs/zpaq.py b/patoolib/programs/zpaq.py index 795cf5b..24ec8e2 100644 --- a/patoolib/programs/zpaq.py +++ b/patoolib/programs/zpaq.py @@ -36,4 +36,3 @@ def create_zpaq(archive, compression, cmd, verbosity, interactive, filenames): # zpaq has no separate test mode, so use listing instead test_zpaq = list_zpaq - diff --git a/patoolib/util.py b/patoolib/util.py index 3beac5f..8a6029a 100644 --- a/patoolib/util.py +++ b/patoolib/util.py @@ -477,7 +477,7 @@ def tmpfile (dir=None, prefix="temp", suffix=None): def shell_quote (value): """Quote all shell metacharacters in given string value with strong - (ie. single) quotes, handling the single quote especially.""" + (i.e. single) quotes, handling the single quote especially.""" if os.name == 'nt': return shell_quote_nt(value) return "'%s'" % value.replace("'", r"'\''") @@ -670,7 +670,7 @@ def strlist_with_or (alist): def is_same_file (filename1, filename2): """Check if filename1 and filename2 point to the same file object. - There can be false negatives, ie. the result is False, but it is + There can be false negatives, i.e. the result is False, but it is the same file anyway. Reason is that network filesystems can create different paths to the same physical file. """ diff --git a/setup.py b/setup.py index a582de3..6fc8b48 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # Copyright (C) 2010-2016 Bastian Kleineidam # @@ -53,7 +53,7 @@ def cnormpath (path): release_ro = re.compile(r"\(released (.+)\)") def get_release_date (): - """Parse and return relase date as string from doc/changelog.txt.""" + """Parse and return release date as string from doc/changelog.txt.""" fname = os.path.join("doc", "changelog.txt") release_date = "unknown" with open(fname) as fd: @@ -209,7 +209,7 @@ installed. maintainer = MyName, maintainer_email = MyEmail, license = "GPL", - url = "http://wummel.github.io/patool/", + url = "https://wummel.github.io/patool/", packages = ['patoolib', 'patoolib.programs'], data_files = data_files, scripts = ['patool'], diff --git a/tests/archives/test_tar.py b/tests/archives/test_tar.py index 7f31730..7c5e00b 100644 --- a/tests/archives/test_tar.py +++ b/tests/archives/test_tar.py @@ -46,7 +46,7 @@ class TestTar (ArchiveTest): self.archive_commands('t.tar.lzma') # even though clzip would support extracting .lz files, the - # file(1) --uncompress command does not use it for achive detection + # file(1) --uncompress command does not use it for archive detection @needs_program(program) @needs_program('lzip') def test_tar_lzip (self): @@ -88,7 +88,7 @@ class TestTar (ArchiveTest): # self.archive_commands('t.tar.lzma.foo', format="tar", compression="lzma") # even though clzip would support extracting .lz files, the - # file(1) --uncompress command does not use it for achive detection + # file(1) --uncompress command does not use it for archive detection @needs_program('lzip') @needs_program('file') @needs_codec(program, 'lzip')