Logo: Relish

  1. Sign up
  2. Sign in

Project: Piano-extraction

Piano-extraction

Piano Extraction

Simple static-site extraction, usable for any cache.manifest enabled site.

Piano Extraction is intended to be used as an extension of Piano, but for now Piano lack the ability to implement extensions.

Instalation

Not published yet on rubygems.org.
Clone from repo and

rake install

Usage

Given a site with a cache manifest,

require "piano-extraction"

# Instance the extractor
extractor = Piano::Extraction::Extractor.new "http://example.com/"

# Instruct it to search and fetch a cache.manifest
extractor.use_manifest! 

# Download the cacheable files
extractor.download_to "extraction/path"

I will download all files setted as cacheable in the target cache.manifest.

Piano Extraction also has extensions for the cache.manifest syntax in order to specify files to be left out, or not-cacheable files to be extracted anyway. For example:

CACHE MANIFEST:
index

# Extraction stop
this_will_not_be_extracted

NETWORK:
# Nothing from here will be extracted since it is fetched from network
updates

# Extraction start
# ...but these will be extracted because
# Piano::Extraction is explicitly told to do so
last

License

@ Xavier Via

GPL License, what else?

Topics

  1. Directly pointed Manifest
  2. Full cache.manifest parsing
  3. Use Manifest

Last published about 2 years ago by xaviervia.