Skip to main content

An administration tool for performing mass text substitution on Plone contents

Project description

Read carefully!

Even if this product is giving you an high level Plone user interface, it’s not designed for end users or “normal” site administrators. You must be a Python regular expression expert (probably a Grand Master).

Introduction

This product will give to your Plone site managers a tool for performing text search using regular expressions query and optionally performing text substitutions on the main rich text field of your site’s contents.

How to use

This product is designed for performing the same text type of replacement operation on many documents without going to edit every ones.

By default the product works with all know rich text fields of Plone contents, that are:

  • text field from Page content type

  • text field from Event content type

  • text field from News Item content type

  • text field from Collection content type (old-style also)

You can extending the set above providing 3rd party extensions (see below).

Accessing the “Bulk modify contents” panel

In your “Site setup” section you will find a new “Bulk modify contents” panel. All operations take places from this page.

Results

Results of the search are displayed in a table at the bottom of the page.

Search form

The table will contain a preview of the found text and minimal information about the content. Please note that a single document can be found multiple time in the table as the minimal entity is the text match, not the document itself.

Replace text

The simpler way of performing text replacement is get filling the “Default replacement” text area.

Search form

The table of results will change, providing a graphical preview of what will be changed applying your replacement expression.

Search form

The user must now select all replacement that he really want to apply, the click the “Modify selected” button. Only selected matches are changed.

Search form

Replacing options

When changing text you are (obviously) changing a Plone content, so you have some additional option available:

Do not update anything (silent change)

Useful you you want to fix some contents without updating other metadata from the content itself. Only the text field (and the Plone full text index) will be updated).

Site members will never notice this tpe of changes.

Update modification time

Update also the last modification time of the document.

Create a new version (if possible)

Full modification. If the content type is versionable, a new version will be saved.ù

Advanced use

Advanced server side operations

Sometimes a simple text regex expression is not enough. This product is supporting a way of handling really complex text substitution by calling some server side components.

By default, only one handler is available: “Convert internal links to resolveuid usage”, that can transform Plone internal links to content to a form that use the “resolveuid” call. This can be used in Plone sites where the TinyMCE option “Link using UIDs” were not enabled by mistake (something like the feature given by Kupu editor).

Search form

Adding new server side special handlers

Proving new IBulkModifyReplacementHandler utility will automatically display new special replacement:

<utility
     name="handler_name"
     component="your.product.utility.YourTextSpacialReplacement"
     provides="rt.bulkmodify.interfaces.IBulkModifyReplacementHandler"
  />

Extending handled types

To being able to change a text field of a type not handled, you must provide a proper adapter with a 3rd party product:

<adapter
      for="your.product.interfaces.IYourContentTypeInterface"
      provides="..interfaces.IBulkModifyContentChanger"
      factory="your.product.adapter.YourTextContentAdapter"
      />

TODO

  • Adding a way of using product’s features as a running script instance

  • We need JavaScript testing

  • The product is designed for performing multiple write commit on ZODB, but probably a way of performing a single huge write operation can be useful

Credits

Developed with the support of Regione Emilia Romagna; Regione Emilia Romagna supports the PloneGov initiative.

Authors

This product was developed by RedTurtle Technology team.

RedTurtle Technology Site

Changelog

0.1 (2013-03-14)

  • Initial release

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

rt.bulkmodify-0.1.zip (55.4 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