Permalink
Browse files

improve docs and bump version

  • Loading branch information...
1 parent 735537a commit 861d81ad1016dc7c0b1d6e0638daac1df24ce13a Dylan Jay committed Apr 19, 2012
Showing with 127 additions and 100 deletions.
  1. +11 −0 CHANGES.txt
  2. +110 −78 README.txt
  3. +5 −21 buildout.cfg
  4. +1 −1 setup.py
View
@@ -1,4 +1,15 @@
+1.1 (2012-04-19)
+----------------
+
+- remoteconstructor: handle uploading with moved content or content thats changed type
+- ploneprune: ignore items with no path
+- handle Protocol errors in schemaupdater
+- handle some xmlrpc errors better
+- add conditions so can skip existing
+- improve documentation
+
+
1.0b4 (2011-06-29)
------------------
- fix uploading html in plone 4.1 by setContentType
View
@@ -13,61 +13,99 @@ Usage
Five different blueprints are provided.
-Remote constructor
-====================
+Common Options
+==============
-TODO: How to guess the type and location to be created
+target
+ Url of Plone folder to upload content. You will need to include the username and
+ password using the url syntax. e.g. http://user:password@site.com/folder.
+ If you'd prefer not to hardcode your password in a pipeline.cfg you can use
+ `mr.migrator` which lets you override your pipeline using the commandline.
-Example::
+path-key
+ Which blueprint item dictionary key is used to extract the remote path information
+ or the item. Default value *path* .
- #
- # Create remote item on Plone site
- #
- [ploneuploader]
- blueprint = transmogrify.ploneremote.remoteconstructor
+transmogrify.ploneremote.constructor
+====================================
+
+Drop in replacement for constructor that will use xmlprc calls to construct content on a remote plone site
+
+Options
+~~~~~~~
+
+target
+ see `Common Options`
+
+path-key
+ see `Common Options`
+
+type-key
+ Key of the field with item type to create. Defaults to 'type','portal_type', 'Type','_type'
+
+creation-key
+ Key of the field to determine if item should be created. Defaults to '_creation_flag'
+create-condition
+ TAL expression to determine if item should be added. Defaults to 'python:True'
-Remote schema updater
-========================================
+move-condition
+ If the content has already been uploaded and then moved this TAL expression
+ will determine if the content should be moved back. Default is 'python:True'
+
+remove-condition
+ If the content has already been uploaded and is of a different type this
+ TAL expression will determine if the item can be removed and recreated.
+
+
+
+transmogrify.ploneremote.remoteschemaupdater
+============================================
This will use XML-RPC to call Archetypes setXXX() mutator methods remotely
to set field values.
TODO: How to input schema fields
-Example::
+Options
+~~~~~~~
- #
- # Update the remote item with new extracted content from Sphinx documentation
- #
- [schemaupdater]
- blueprint = transmogrify.ploneremote.remoteschemaupdater
+target
+ see `Common Options`
+
+path-key
+ see `Common Options`
+
+condition
+ TAL Expression to determine to use this blueprint
-Portal transform
-====================
+skip-existing
+ Default is 'False'
-TODO: No idea
-Workflow updater
-====================
+transmogrify.ploneremote.remoteworkflowupdater
+==============================================
Triggers the state transition of the remote item workflow i.e.
publishes the item if it is not public.
-Takes the following parameters:
+Options
+~~~~~~~
-* *path-key*: which blueprint item dictionary key is used to extract the remote path information
- or the item. Default value *path* .
+target
+ see `Common Options`
-* *transitions-key*: which blueprint item dictionary key is used as the transition name
- for the item.
+path-key
+ see `Common Options`
-* *target*: Remote site URL
+transitions-key
+ which blueprint item dictionary key is used as the transition name
+ for the item.
-Redirector
-==========
+transmogrify.ploneremote.remoteredirector
+=========================================
This blueprint adds redirection aliases to those content items that have changed
it's paths during tranmogrification process. It takes into account item's
@@ -79,10 +117,6 @@ is required to install that addon in order to make
If *path* is not equal to *orig_path* then appropriate aliases is being added
to local Plone utility (IRedirectionStorage) using Aliases form.
-Takes the following parameters:
-
-* *path-key*: which blueprint item dictionary key is used to extract the remote
- path information or the item. Default value *path* .
Example::
@@ -92,53 +126,51 @@ Example::
[redirector]
blueprint = transmogrify.ploneremote.remoteredirector
+Options
+~~~~~~~
-Making remote site URL configurable
------------------------------------
+target
+ see `Common Options`
-All blueprints take remote site URL parameter.
-Instead of hardcoding this to your *pipeline.cfg*
-you can make it configurable from the command line using the following
-*buildout.cfg* snippet to create a helper script::
+path-key
+ see `Common Options`
- #
- # Recipe to create toplone command.
- #
- # It will walk through all blueprints defined
- # in pipeline.cfg and override their target parameter
- # to be a remote Plone site given on the command line.
- # This all happeins in initialization= magic.
- #
- # Also Python logger is initialized to give us verbose
- # output. Some blueprints use logging module for the output.
- #
- [toplone]
- recipe = zc.recipe.egg
- eggs =
- transmogrify.htmltesting
- transmogrify.webcrawler
- transmogrify.siteanalyser
- transmogrify.htmlcontentextractor
- transmogrify.pathsorter
- transmogrify.ploneremote
- Products.CMFCore
- initialization =
- from urllib import pathname2url as url
- from sys import argv
- import logging
-
- logging.basicConfig(level=logging.INFO)
- args = dict(webcrawler=dict(site_url=url('build')),
- localconstructor=dict(output=url('ploneout')),
- ploneuploader=dict(target=argv[1]),
- schemaupdater=dict(target=argv[1]),
- publish=dict(target=argv[1]),
- redirector=dict(target=argv[1]),
- )
- arguments = 'pipeline.cfg', args
- entry-points = toplone=transmogrify.htmltesting.runner:runner
- extra-paths = ${zope2:location}/lib/python
-
+transmogrify.ploneremote.remoteprune
+====================================
+
+Removes any items from a folder if it's not an item in the pipeline.
+
+Options
+~~~~~~~
+
+target
+ see `Common Options`
+
+path-key
+ see `Common Options`
+
+prune-folder-key
+ which transmogrifier field is read to check
+ if the prune folder is run against the remote folder.
+ The default value os "_prune-folder"
+
+transmogrify.ploneremote.remotenavigationexcluder
+=================================================
+
+Set "Exclude from Navigation" setting for remote Plone content items.
+
+Options
+~~~~~~~
+
+target
+ see `Common Options`
+
+path-key
+ see `Common Options`
+
+exclude-from-navigation-key
+ Which key we use to read navigation exclusion hint.
+ Default is 'exclude-from-navigation'
Authors
View
@@ -7,7 +7,7 @@ parts =
# roadrunner
omelette
extends =
- http://dist.plone.org/release/3.3/versions.cfg
+ http://dist.plone.org/release/4.1/versions.cfg
# http://good-py.appspot.com/release/dexterity/1.0a1?plone=3.3rc2
@@ -17,40 +17,24 @@ versions = versions
[test]
recipe = zc.recipe.testrunner
eggs =
- ${instance:eggs}
-extra-paths = ${zope2:location}/lib/python
+ transmogrify.ploneremote
[lxml]
recipe = z3c.recipe.staticlxml
-egg = lxml == 2.2.2
-
-[zope2]
-recipe = plone.recipe.zope2install
-url = ${versions:zope2-url}
-fake-zope-eggs = true
-additional-fake-eggs =
- ZConfig
- pytz
- zope.site
+egg = lxml
[instance]
recipe = plone.recipe.zope2instance
-zope2-location = ${zope2:location}
debug-mode = on
verbose-security = on
user = admin:admin
-zcml-eggs =
- pretaweb.funnelweb
- plone.reload
eggs =
- PIL
Plone
- plone.i18n
- ${instance:zcml-eggs}
${lxml:egg}
+ mr.migrator
+ funnelweb
zcml =
- ${instance:zcml-eggs}
[roadrunner]
recipe = roadrunner:plone
View
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os
-version = '1.0b4'
+version = '1.1'
setup(name='transmogrify.ploneremote',
version=version,

0 comments on commit 861d81a

Please sign in to comment.