Sha256: 22f5223d33e239010fd25f357d2a7364eaadb43e24cdf0d752b5488c64a8f308

Contents?: true

Size: 1.49 KB

Versions: 7

Compression:

Stored size: 1.49 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]({relocatable:
../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

7 entries across 7 versions & 3 rubygems

Version Path
gettalong-webgen-0.5.8.20090507 doc/source/tararchive.page
gettalong-webgen-0.5.9.20090620 doc/source/tararchive.page
gettalong-webgen-0.5.9.20090626 doc/source/tararchive.page
thewoolleyman-webgen-0.5.8.20090419 doc/source/tararchive.page
webgen-0.5.10 doc/source/tararchive.page
webgen-0.5.9 doc/source/tararchive.page
webgen-0.5.8 doc/source/tararchive.page