Package: zip-files
zip-filesCommand line utilities for creating zip files.Provides thezip-filesandzip-foldercommand line utilities. These are
intended as an easy platform-independent tool to create zip files with
an arbitrary file name and an arbitrary root (the top-level folder after
extracting a zip) from files and folders at arbitrary locations on the file
system.Typical usage includes:Deploy zip archives of Sphinx-documentation while releasing Python packages:zip-folder--auto-root--outfiledocs/_build/artifacts/mypackage-v1.0.0.zipdocs/_build/htmlcreates a filemypackage-v1.0.0.zipindocs/_build/artifactsthat
unzips as a foldermypackage-v1.0.0containing the files originally indocs/_build/html/.Create zip files pulled together from different locations, for emailing:zip-files-a-oreport.zip./report2020-01.tex/scratch/project/plots/*.pdfcreates a filereport.zipthat unzips as a folderreportcontaining the filereport2020-01.texand all the pdf files
originally in/scratch/project/plots/.zip-files-freport2020-01-oreport.zip./report2020-01.tex/scratch/project/plots/*.pdfdoes the same, but unzips as a folderreport2020-01instead ofreport.Development of zip-files happens onGithub.InstallationTo install the latest released version of zip-files, run this command in your terminal:pipinstallzip_filesThis is the preferred method to install zip-files, as it will always install
the most recent stable release.  It will result in the executable commandszip-filesandzip-folderbeing added to your environment’sbinfolder.Usagezip-filesUsage: zip-files [OPTIONS] [FILES]...

  Create a zip file containing FILES.

Options:
  -h, --help                      Show this message and exit.
  --version                       Show the version and exit.
  --debug                         Activate debug logging.
  -f, --root-folder ROOT_FOLDER   Folder name to prepend to FILES inside the
                                  zip file.

  -c, --compression [stored|deflated|bzip2|lzma]
                                  Zip compression method. The following
                                  methods are available: "stored": no
                                  compression; "deflated": the standard zip
                                  compression method; "bzip2": BZIP2
                                  compression method (part of the zip standard
                                  since 2001); "lzma": LZMA compression method
                                  (part of the zip standard since 2006).
                                  [default: deflated]

  -a, --auto-root                 If given in combination with --outfile, use
                                  the stem of the OUTFILE (without path and
                                  extension) as the value for ROOT_FOLDER

  -x, --exclude GLOB_PATTERN      Glob-pattern to exclude. This is matched
                                  from the right against all paths in the zip
                                  file, see Python pathlib's Path.match
                                  method. This option can be given multiple
                                  times.

  -X, --exclude-from FILE         File from which to read a list of glob-
                                  patterns to exclude, cf. --exclude. Each
                                  line in FILE is one pattern. This option can
                                  be given multiple times.

  --exclude-dotfiles / --include-dotfiles
                                  Whether or not to include dotfiles in the
                                  zip files. By default, dotfiles are
                                  included.

  --exclude-vcs / --include-vcs   Whether or not to include files and
                                  directories commonly used by version control
                                  systems. (Git, CVS, RCS, SCCS, SVN, Arch,
                                  Bazaar, Mercurial, and Darcs), e.g.
                                  '.git/', '.gitignore' '.gitmodules'
                                  '.gitattributes' for Git. By default, VCS
                                  are included.

  --exclude-git-ignores / --include-git-ignores
                                  Whether or not to look for .gitignore files
                                  and to process them for exclude patterns.
                                  Note that the .gitignore file itself is
                                  still included in the zip archive unless
                                  --exclude-vcs is given. By default,
                                  .gitignore files are not processed.

  -o, --outfile OUTFILE           The path of the zip file to be written. By
                                  default, the file is written to stdout.zip-folderUsage: zip-folder [OPTIONS] FOLDER

  Create a zip file containing the FOLDER.

Options:
  -h, --help                      Show this message and exit.
  --version                       Show the version and exit.
  --debug                         Activate debug logging.
  -f, --root-folder ROOT_FOLDER   Folder name to use as the top level folder
                                  inside the zip file (replacing FOLDER).

  -c, --compression [stored|deflated|bzip2|lzma]
                                  Zip compression method. The following
                                  methods are available: "stored": no
                                  compression; "deflated": the standard zip
                                  compression method; "bzip2": BZIP2
                                  compression method (part of the zip standard
                                  since 2001); "lzma": LZMA compression method
                                  (part of the zip standard since 2006).
                                  [default: deflated]

  -a, --auto-root                 If given in combination with --outfile, use
                                  the stem of the OUTFILE (without path and
                                  extension) as the value for ROOT_FOLDER

  -x, --exclude GLOB_PATTERN      Glob-pattern to exclude. This is matched
                                  from the right against all paths in the zip
                                  file, see Python pathlib's Path.match
                                  method. This option can be given multiple
                                  times.

  -X, --exclude-from FILE         File from which to read a list of glob-
                                  patterns to exclude, cf. --exclude. Each
                                  line in FILE is one pattern. This option can
                                  be given multiple times.

  --exclude-dotfiles / --include-dotfiles
                                  Whether or not to include dotfiles in the
                                  zip files. By default, dotfiles are
                                  included.

  --exclude-vcs / --include-vcs   Whether or not to include files and
                                  directories commonly used by version control
                                  systems. (Git, CVS, RCS, SCCS, SVN, Arch,
                                  Bazaar, Mercurial, and Darcs), e.g.
                                  '.git/', '.gitignore' '.gitmodules'
                                  '.gitattributes' for Git. By default, VCS
                                  are included.

  --exclude-git-ignores / --include-git-ignores
                                  Whether or not to look for .gitignore files
                                  and to process them for exclude patterns.
                                  Note that the .gitignore file itself is
                                  still included in the zip archive unless
                                  --exclude-vcs is given. By default,
                                  .gitignore files are not processed.

  -o, --outfile OUTFILE           The path of the zip file to be written. By
                                  default, the file is written to stdout.History0.4.1 (2021-04-21)Bugfix: Permissions (especially executable permissions) were not preserved on Unix0.4.0 (2021-04-04)Added: options--exclude-vcs,--exclude-git-ignores, and--exclude-vcs0.3.0 (2020-01-19)Added: option--exclude0.2.0 (2020-01-17)Added: option--auto-root0.1.0 (2020-01-17)Initial release