Summary | Provides paths from a specified (gzipped) tar archive that match a certain pattern |
---|---|
Short name | tar_archive |
Provided by bundle | built-in |
API doc | Webgen::Source::TarArchive |
Description
This source extension creates paths for all files from a (possibly gzipped) tar archive. The used archive can reside locally but it is also possible to use archives accessible via the http(s) and ftp protcols.
This extension is only available if the archive-tar-minitar library is installed. The preferred way to do this is via Rubygems:
$ gem install archive-tar-minitar
Usage
When using this source, the first parameter is the file system path to the archive or the URL of the
archive and the second, optional, parameter specifies a path pattern (see File.fnmatch) for
selecting the to-be-used files/directories in the tar archive. The default value for the path
pattern is **/*
which matches all files/directories in the tar archive.
Examples
The used sources can be specified via the sources configuration option, so each of the examples below can directly be used in the configuration file.
-
Using all files/directories from a local tar archive in addition to the default configuration:
sources: - [/, file_system, src] - [/, tar_archive, archive.tar]
-
Using images stored in a remote gzipped tar archive in addition to the default configuration:
sources: - [/, file_system, src] - [/, tar_archive, http://www.example.com/archive/data.tgz, **/*.jpg]