Sha256: 3ea9c1504dd998c85fba354214d0f9e98e7ab0ae3d586363ebd6e21205e09b2c

Contents?: true

Size: 1.47 KB

Versions: 2

Compression:

Stored size: 1.47 KB

Contents

---
title: Webgen::Source::TarArchive
---
## Description

The tar archive source can be used to include the files from a (possibly gzipped) tar archive. The
used archive can be stored locally on the file system but it is also possible to use archives
accessible via the http(s) and ftp protcols.

> This extension is only available if you have installed the [archive-tar-minitar][1] library. The
> preferred way to do this is via Rubygems:
>
>     gem install archive-tar-minitar
{:.warning}

The first parameter for the tar archive source is the URL of the archive and the second, optional,
parameter specifies a glob (see [File.fnmatch]) for selecting the to-be-used files/directories in the
tar archive.

[File.fnmatch]: http://ruby-doc.org/core/classes/File.html#M002603
[1]: http://raa.ruby-lang.org/project/minitar/

## Examples

The used sources can be specified via the [`sources` configuration
option](../reference_configuration.html#sources), so each of the examples below can be specified in
the `config.yaml` file.

1.  Using all files/directories from a local tar archive in addition the default configuration:

        sources:
          - [/, Webgen::Source::FileSystem, src]
          - [/, Webgen::Source::TarArchive, archive.tar]

2.  Using images stored in a remote gzipped tar archive in addition to the default configuration:

        sources:
          - [/, Webgen::Source::FileSystem, src]
          - [/, Webgen::Source::TarArchive, http://www.example.com/archive/data.tgz, **/*.jpg]

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webgen-0.5.12 doc/source/tararchive.page
webgen-0.5.11 doc/source/tararchive.page