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 details)

Uploaded Source

File details

Details for the file transmogrify.extract-0.1.0.zip.

File metadata

File hashes

Hashes for transmogrify.extract-0.1.0.zip
Algorithm Hash digest
SHA256 84bc5bdc51dce547b0a7a3863077d749610ffdac37d4197d0cfdf6db5bca389d
MD5 7cffe3cc907fbf1c3bbd929f08a06b58
BLAKE2b-256 1417551134b0b33cab243f28b4b77b3a0c9545f03134003df68c3d6cf2c98d8f

See more details on using hashes here.

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