{ "info": { "author": "Pat Smith", "author_email": "pat.smith@isotoma.com", "bugtrack_url": null, "classifiers": [], "description": "========\nzkaffold\n========\n\nA plone product to install content on a plone site.\n\nFeatures\n--------\n\n * Install content\n\n * Install products\n\n * Delete content\n\n * Apply zope interfaces\n\n * Modify content\n\n * Generate test content\n\nHow to install\n--------------\n\nAdd zkaffold to your product:\n\n * Add \"zkaffold\" to your product's install_requires in setup.py\n\n * Add in your product's configure.zcml\n\n * Add \"profile-zkaffold:default\" as a dependency to your product's\n metadata.xml\n\n * run ./bin/buildout\n\nzkaffold should now be installed. Note that zkaffold is not installable /\nuninstallable from the portal quick installer.\n\nHow to use\n----------\n\nAfter installing zkaffold in your plone site, you can build content for\nyour plone site by:\n\n * create \"initial\" profile in your product,\n \n * create a directory called \"zkaffold\" in profile/initial,\n\n * create structure.xml (example structure.xml is in\n zkaffold/exportimport/tests/test_exportimport.py),\n\nYou can also create default users in your plone site by:\n\n * create members.xml (example members.xml is in\n zkaffold/exportimport/tests/test_exportimport.py)\n\nIf you are using buildout, in your buildout.cfg:\n\n * in the [plonesite] section, add your product initial profile (e.g.\n mysite:initial) to \"profiles-initial\",\n * run ./bin/buildout\n\nYour plone site should now be populated with content specified in\nstructure.xml. Note that if your plone site already exists before running\nbuildout, it will not add any content. You'll have to delete your plone\nsite or run the zkaffold import step to add the content.\n\nYou can use different profiles to create different content, for example if\nyou want test content, you can create another profile and add that in\nprofiles-initial when you want test content to be built.\n\nzkaffold publishes all objects by default by trying to apply transition\n\"publish\" to the objects. If your objects need a different way of\npublishing, have a look at zkaffold/exportimport/tests/test_exportimport.py.\n\nzkaffold XML schema\n-------------------\nThe basic schema that all zkaffold XML files should begin with is::\n\n \n \n \n\nThe ``site`` element is the lone root element and represents the Plone portal\nobject.\n\nDescending the object tree\n``````````````````````````\nObjects may be traversed by their ID in order to reach the object which should\nbe modified. This is done by specifying elements with the tag name as the ID\nof the object in question. For example, to descend to the object at path\n\"``portal/my_folder/my_obj``\" , one would use the following syntax::\n \n \n \n \n ...\n \n \n \n\nAdding new objects\n``````````````````\nTo insert a new object into a folderish object, first descend to the target\ncontainer, then insert a new element with the same tag name as the portal type\nyou wish to add, with an ``id`` attribute of the ID it should have within the\nZODB::\n \n \n \n \n \n \n \n\nParameters\n''''''''''\nMore often than not, one will want to specify values for fields in the schema\nof the object when it is created. To do this, add a ``params`` child to the\nelement representing the new object, which itself should contain a ``param``\nelement for each field. The ``param`` tag should have the ``name`` attribute\nset to the name of the field in question and the ``type`` attribute set to one\nof ``text``, ``lipsum``, ``lipsum_html``, ``reference``, ``image``, ``file``,\n``boolean``, ``list`` or ``reference_list``. The ``param`` element then\ncontains the value that should be given to that field. One need not specify a\n``param`` element for each and every field of a content type, the default\nvalues will be used where fields are not specified.\n\n``param`` elements with the ``type`` attribute set to ``lipsum`` or\n``lipsum_html`` have the optional attribute ``paras`` which specifies the\nnumber of paragraphs of `Lipsum `_\nto generate as the value of that field. They also contain no child elements.\nThe ``lipsum`` value causes ordinary Lipsum to be generated with newlines,\nwhereas ``lipsum_html`` generates Lipsum with paragraph tags as necessary::\n\n \n \n \n \n My new object\n \n True\n /my_folder/my_obj\n new_obj_thumb.jpg\n \n \n \n \n\nAs in the above example, references are given as path strings to the\nreferenced object. Images & files are given as file names relative to the\ndirectory of the XML file.\n\nMulti-valued parameters\n'''''''''''''''''''''''\nFor fields which may contain multiple values such as ``ReferenceList`` or\n``LinesField``, the ``param`` element takes the ``type`` attribute ``list`` or\n``reference_list``. It should then contain an ``items`` element, which\ncontains zero or more ``item`` elements with their ``type`` attribute set\nappropriately, as per the ``param`` tag and their value set as their inner\nXML::\n\n \n \n \n \n My new object\n \n \n Option 1\n Option 2\n \n \n \n \n \n \n\nInterfaces\n''''''''''\nOccasionally one may wish to add interfaces to objects which they do not\nautomatically provide, particularly marker interfaces. This is achieved using\nthe ``interfaces`` & ``interface`` tags, like so::\n\n \n \n \n \n identifier.of.IMyMarker\n identifier.of.IReplacementObject\n \n \n My new object\n \n \n \n \n\nThis adds the interfaces specified by the identifiers to the object.\n\nInterfaces that are already applied to objects may be similarly removed by\nreplacing the ``interface`` element with a ``remove`` element, thus::\n \n \n \n \n \n IMyMarker\n \n \n My new object\n \n \n \n \n\nModifying existing objects\n``````````````````````````\nExisting objects may be modified in a very similar way to which they are\nadded. Simply descend to the object in question, append the ``modify`` element\nto it, and add ``params`` and ``interfaces`` elements as its children, as\nnecessary. Instead of taking the default values where fields are not\nspecified, the fields will retain their current values::\n\n \n \n \n \n \n My updated title for my new object\n \n \n \n \n \n\nSetting the default page of folderish objects\n'''''''''''''''''''''''''''''''''''''''''''''\nTo set the default page of a new or existing folderish object, use the\n``modify`` element with a ``setDefaultPage`` attribute::\n\n \n \n \n ...\n \n \n \n \n \n ...\n \n \n ...\n \n \n \n\nDeleting objects\n````````````````\nExisting objects can be deleted by descending to their container object and\ninserting a ``delete`` element with its ``id`` attribute set to the ID of the\nobject which should be deleted. The ``delete`` element also has the optional\nparameter, ``ctype`` which can be used to specify a particular content type\nwhich the specified object must be in order to be deleted::\n \n \n \n \n \n \n \n \nDependencies\n------------\n\nzkaffold depends on lxml, which depends on libxml2-dev and libxslt-dev.\nIn Debian, you can use:\n\n * ``sudo aptitude install libxml2-dev libxslt-dev``\n\nPLUGIN\n------\n\nzkaffold supports a plugin system for exporting content:\n\n * Add an import step for your profile initial,\n\n * create an exporter for your field, it should return a\n lxml.etree.Element for or (lxml.etree.Element for ,\n filename, file content)::\n\n def my_field_exporter(plone_object, field):\n ...\n return param\n\n * create the import step to register the field exporter::\n\n from zkaffold.contextexporter import IContentExporter\n\n def register_field_exporters(context):\n portal = context.getSite()\n sm = portal.getSiteManager()\n exporter = sm.getUtility(IContentExporter)\n exporter.register_field_exporter('mysite.fields.MyField',\n 'mysite.field_exporters.my_field_exporter')\n\nTests\n-----\n\nTo run zkaffold's tests, you need to:\n\n * add \"zkaffold [test]\" in the \"eggs\" in the [test] section of your\n buildout.cfg,\n\n * run ./bin/buildout,\n\n * ./bin/test", "description_content_type": null, "docs_url": "https://pythonhosted.org/zkaffold/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/zkaffold", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "zkaffold", "package_url": "https://pypi.org/project/zkaffold/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zkaffold/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/zkaffold" }, "release_url": "https://pypi.org/project/zkaffold/0.0.11/", "requires_dist": null, "requires_python": null, "summary": "Build out demonstration content for plone", "version": "0.0.11" }, "last_serial": 802303, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "0b9facb153d71119517261d3ff28891c", "sha256": "f11fb30d121ba2dae17e289d31b104a040f91c1c2c219f57dc70b4e7d745105a" }, "downloads": -1, "filename": "zkaffold-0.0.10.tar.gz", "has_sig": false, "md5_digest": "0b9facb153d71119517261d3ff28891c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28018, "upload_time": "2011-09-05T11:24:53", "url": "https://files.pythonhosted.org/packages/7a/0d/cb5c5ca0911da6a09c03faf325b6699f359d7b497dfa352e5d653deaeff0/zkaffold-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "1f6004b8aee60fade340b35b80031085", "sha256": "7c41af15eb0d5fdf469c2fb1b5bd46b66853763e4a289c9ba7d133fa9dc7836b" }, "downloads": -1, "filename": "zkaffold-0.0.11.tar.gz", "has_sig": false, "md5_digest": "1f6004b8aee60fade340b35b80031085", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26042, "upload_time": "2012-10-18T13:28:25", "url": "https://files.pythonhosted.org/packages/0b/24/b5814eacaad4c8d066645a30cd25ec98fb0f91a90cbb449beb151ee3a1c5/zkaffold-0.0.11.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "b65d09fe4182f7f43d60e9d5c31959a2", "sha256": "7100f4b1fd12bd282a055daf6a9d15732c49b3b2f09ea0cb0f58a8e557e3c921" }, "downloads": -1, "filename": "zkaffold-0.0.8-py2.4.egg", "has_sig": false, "md5_digest": "b65d09fe4182f7f43d60e9d5c31959a2", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 63443, "upload_time": "2011-08-12T17:05:53", "url": "https://files.pythonhosted.org/packages/91/07/587eaa40ca2f49fe0325ed35e485781bee58e4fe31539fe2a8e32b2b9698/zkaffold-0.0.8-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "b3dea9e741035a6aa102057a897ec563", "sha256": "9c08df5c30d0af37492db65f4047dd9f10aa847a54fb65db15076465c46a152c" }, "downloads": -1, "filename": "zkaffold-0.0.8-py2.6.egg", "has_sig": false, "md5_digest": "b3dea9e741035a6aa102057a897ec563", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 62424, "upload_time": "2011-08-12T17:06:08", "url": "https://files.pythonhosted.org/packages/bf/a8/fea3882b73d3cab1e78ea06fb92c5ef068f7092a38d02fd54ac39a47deed/zkaffold-0.0.8-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "83543ba010f3cce312b7573279bba375", "sha256": "90e59f358d23d260b8f3c568a816212146a69842e97c1cbc7bca68c036cf871b" }, "downloads": -1, "filename": "zkaffold-0.0.8.tar.gz", "has_sig": false, "md5_digest": "83543ba010f3cce312b7573279bba375", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24930, "upload_time": "2011-08-12T17:05:30", "url": "https://files.pythonhosted.org/packages/85/a5/107b60dfd08dd030408a38c7750c0727a513270ad0ac11b147935ffa7eeb/zkaffold-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "42dee1a1eb3d77c432fab83247d3a351", "sha256": "f575e7289407643cc7665cae83a5a04bb0ab0de68cd9a3908950075f6449b4a2" }, "downloads": -1, "filename": "zkaffold-0.0.9-py2.4.egg", "has_sig": false, "md5_digest": "42dee1a1eb3d77c432fab83247d3a351", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 66807, "upload_time": "2011-08-24T11:53:09", "url": "https://files.pythonhosted.org/packages/78/59/434541c0eb0030a4f42a29d8b48ba5a11be5c8fe2251a7ca0e623b2a8117/zkaffold-0.0.9-py2.4.egg" }, { "comment_text": "", "digests": { "md5": "c0a732ff5e55490cc19d463c5877949d", "sha256": "7372d11c99de912bcbd2a9477f4fdf72b4e74e83ae0903400f91303f7189a7a0" }, "downloads": -1, "filename": "zkaffold-0.0.9-py2.6.egg", "has_sig": false, "md5_digest": "c0a732ff5e55490cc19d463c5877949d", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 65785, "upload_time": "2011-08-24T11:52:47", "url": "https://files.pythonhosted.org/packages/96/be/3f84b805632b7bae883e0d977d7df9cc44d55a05e573d88576d390cda493/zkaffold-0.0.9-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "16e027a62175fc09b2343caac4792832", "sha256": "91add012da7052a1790886aa1b79201d673eb02e460d1406aea2a712a6d9d6ce" }, "downloads": -1, "filename": "zkaffold-0.0.9.tar.gz", "has_sig": false, "md5_digest": "16e027a62175fc09b2343caac4792832", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28036, "upload_time": "2011-08-24T11:53:28", "url": "https://files.pythonhosted.org/packages/e0/b3/ce2600a2302250ac02d0e91e02b82567afb66e688988d6138d5e517e01cb/zkaffold-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f6004b8aee60fade340b35b80031085", "sha256": "7c41af15eb0d5fdf469c2fb1b5bd46b66853763e4a289c9ba7d133fa9dc7836b" }, "downloads": -1, "filename": "zkaffold-0.0.11.tar.gz", "has_sig": false, "md5_digest": "1f6004b8aee60fade340b35b80031085", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26042, "upload_time": "2012-10-18T13:28:25", "url": "https://files.pythonhosted.org/packages/0b/24/b5814eacaad4c8d066645a30cd25ec98fb0f91a90cbb449beb151ee3a1c5/zkaffold-0.0.11.tar.gz" } ] }