Skip to main content

Extracts all content from within the specified CSS id or class

Project description

Introduction

This simple Transmogrifier blueprint extracts text (including HTML) from within the specified CSS id (“content” id by default, e.g. <div id=”content”>EXTRACT ME</div>).

Installation

Sample installation (via mr.migrator):

[buildout]
develop = .
extends = http://x.aclark.net/plone/4.1.x/develop.cfg
parts += migrate

[migrate]
recipe = mr.migrator
eggs =
    transmogrify.extract
    transmogrify.filesystem
    transmogrify.ploneremote
    transmogrify.pathsorter
    transmogrify.print
pipeline = pipeline.cfg

Usage

Sample usage:

[transmogrifier]
pipeline =
    source
    extract
    constructor
    schemaupdater
    print

[source]
blueprint = transmogrify.filesystem
directory = docs/sample_content
file-type = Document
file-field = text
wrap-data = false

[extract]
blueprint = transmogrify.extract

[constructor]
#blueprint = collective.transmogrifier.sections.folders
blueprint = transmogrify.ploneremote.remoteconstructor
target = http://admin:admin@localhost:8080/Plone

[schemaupdater]
blueprint = transmogrify.ploneremote.remoteschemaupdater
target = http://admin:admin@localhost:8080/Plone

[print]
blueprint = transmogrify.print

Specify id

By default, the “content” id is used. But you can specify an alternative via:

[extract]
blueprint = transmogrify.extract
id = ALTERNATE CSS ID e.g. wrapper, container, whatever

Encoding and decoding charsets

By default, UTF-8 is used for both. But you can specify an alternative via:

[extract]
blueprint = transmogrify.extract
decode = ALTERNATE CHARSET e.g. ascii, big5, gb2312, euc_kr, etc.
encode = ALTERNATE CHARSET e.g. ascii, big5, gb2312, euc_kr, etc.

Changelog

0.1.0 (2011-08-31)

  • Initial release [aclark]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transmogrify.extract-0.1.0.zip (30.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page