{ "info": { "author": "Philip Bauer", "author_email": "bauer@starzel.de", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.0", "Framework :: Plone :: 5.1", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": ".. This README is meant for consumption by humans and pypi. Pypi can render rst files so please do not use Sphinx features.\n If you want to learn more about writing documentation, please check out: http://docs.plone.org/about/documentation_styleguide_addons.html\n This text does not appear on pypi or github. It is a comment.\n\n.. image:: https://travis-ci.org/collective/collective.contentexport.svg?branch=master\n :target: https://travis-ci.org/collective/collective.contentexport\n\n.. image:: https://coveralls.io/repos/collective/collective.contentexport/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/collective/collective.contentexport?branch=master\n\n.. image:: https://img.shields.io/pypi/v/collective.contentexport.svg\n :target: https://pypi.python.org/pypi/collective.contentexport\n\n.. image:: https://img.shields.io/pypi/l/collective.contentexport.svg\n\n\n==============================================================================\ncollective.contentexport\n==============================================================================\n\nFeatures\n--------\n\nExports dexterity content in various formats:\n\n- xlsx\n- xls\n- csv\n- tsv\n- json\n- yaml\n- html (a table)\n- zip-file containing all images from image-fields\n- zip-file containing all files from file-fields\n- zip-file containing related files and images from relationfields\n\nIt can be used to export all instances of a dexterity type and all its data. It cannot be used to export a folder-structure of content.\n\n.. figure:: docs/export_screenshot.png\n :align: center\n\nUsage\n-----\n\nProvides a form ``/@@collective_contentexport_view`` to configure the export. The form is also availabe in the main controlpanel as `Content export`.\n\nThe form allows you to:\n\n- Select the export type\n- Select the content type to export\n- Choose fields from the selected type to be ignored\n- Select the format of richtext-fields (html/plaintext)\n- Select the format for files and images (url, base64, location within zip-file)\n\ncollective.contentexport uses `tablib `_ for several export-formats.\n\n\nUse in code\n-----------\n\nYou can use the ``collective_contentexport_view`` in code to have more control over the results.\n\nThe view ``collective_contentexport_view`` accepts the following parameters:\n\nexport_type\n The export-format you want to use. Accepts the following options:\n\n - xlsx (Excel Spreadsheet (xlsx))\n - xls (Excel Legacy Spreadsheet (xls))\n - yaml (YAML)\n - html (HTML Table)\n - csv (Comma Separated Values File)\n - tsv (Tab Separated Values File)\n - json (JSON Dump)\n - images (Export images as zip)\n - files (Export files as zip)\n - related (Export related files and images as zip)\n\nportal_type\n The content-type you want to export\n\nblob_format\n The format in which blobs (filed/images) should be exported. Accepts the following options:\n\n - url (URL)\n - base64 (Base64-encoded string)\n - zip_path (Location within the a zip)\n\nrichtext_format\n The format in which richtext (html) should be exported. Options:\n\n - html\n - text/plain\n\nblacklist\n Fields that should be ommited from the export (cannot be combined with whitelist).\n\nwhitelist\n Only these fields should be included in the export (cannot be combined with blacklist).\n\nadditional\n Additional data to export. A dict with a name (for the heading) as key and a callable method as value to get additional data for the export from the objects.\n\nquery\n Catalog-query to filter the exported content.\n\n\nThe following example creates a zip-file with images or files from the field ``primary_picture`` for the type ``some_type``:\n\n.. code-block:: python\n\n view = api.content.get_view('collective_contentexport_view', portal, request)\n view(export_type='related', portal_type='some_type', whitelist='primary_picture')\n\nYou can filter the items that should be exported by passing a catalog-query:\n\n.. code-block:: python\n\n path = '/'.join(self.context.getPhysicalPath())\n view = api.content.get_view('collective_contentexport_view', portal, request)\n view(export_type='json', portal_type='Document', query={'review_state': 'published', 'path': path})\n\nYou can also extend the export.\nIn the following example the value ``some_fieldname`` is being extracted from the object using the method ``_somehandler``.\n\n.. code-block:: python\n\n def _somehandler(obj):\n return some_crazy_transform(obj.custom_field)\n\n additional = {'some_fieldname': _somehandler}\n view = api.content.get_view('collective_contentexport_view', portal, request)\n result = view(export_type='json', portal_type='Document', additional=additional)\n\nYou can also override the default methods to modify the default behavior.\nIn the following example the ``image`` from Images is being extracted using the method ``_get_imagename`` that only dumps the filename of the image:\n\n.. code-block:: python\n\n def _get_imagename(obj):\n if obj.image:\n return obj.image.filename\n\n additional = {'image': _get_imagename}\n view = api.content.get_view('collective_contentexport_view', portal, request)\n result = view(export_type='json', portal_type='Image', additional=additional)\n\n\nCompatability\n-------------\n\ncollective.contentexport is tested to work in Plone 4.3, Plone 5 and PLone 5.1.\n\n\nKnown Issues\n------------\n\n* xslx-Export is broken unless you pinn ``openpyxl = 2.4.9``. See https://github.com/collective/collective.contentexport/issues/4 for details.\n\n\nInstallation\n------------\n\nInstall collective.contentexport by adding it to your buildout::\n\n [buildout]\n\n ...\n\n eggs =\n collective.contentexport\n\n\nand then running ``bin/buildout``.\n\nYou don't need to install the add-on to use the export.\n\n\nContribute\n----------\n\n- Issue Tracker: https://github.com/collective/collective.contentexport/issues\n- Source Code: https://github.com/collective/collective.contentexport\n\n\nSupport\n-------\n\nIf you are having issues, please let us know at https://github.com/collective/collective.contentexport/issues.\n\n\nLicense\n-------\n\nThe project is licensed under the GPLv2.\n\nContributors\n============\n\n- Philip Bauer, bauer@starzel.de\n\nChangelog\n=========\n\n\n1.1 (2018-03-27)\n----------------\n\n- Add modification date to default fields\n [pbauer]\n\n- Add export-view to controlpanel\n [pbauer]\n\n- Run tests with Plone 5.1\n [pbauer]\n\n1.0 (2016-07-09)\n----------------\n\n- Fix tsv-Export\n [pbauer]\n\n- Test compatibility with Plone 5.0.5\n [pbauer]\n\n\n1.0b5 (2015-12-03)\n------------------\n\n- Fix UnicodeEncodeError in get_blob_url when filenames have special characters.\n [pbauer]\n\n- Add path and review_state to exported data that is not part of the schema.\n [pbauer]\n\n\n1.0b4 (2015-11-28)\n------------------\n\n- Allow to pass catalog-query to filter the exported content.\n [pbauer]\n\n\n1.0b3 (2015-11-28)\n------------------\n\n- Move package to https://github.com/collective/collective.contentexport.\n [pbauer]\n\n- No longer bind views to browserlayer to simplify package-use. Rename views\n to prevent unintended name-clashes since we no longer use the browser-layer.\n [pbauer]\n\n\n1.0b2 (2015-11-06)\n------------------\n\n- Add whitelist (only export fields in the whitelist)\n [pbauer]\n\n- Document extending and overriding the export.\n [pbauer]\n\n\n1.0b1 (2015-11-05)\n------------------\n\n- Sort fieldnames in blacklist by alphabet.\n [pbauer]\n\n- Add ability to provide additional export-methods for arbitrary data by\n extending ADDITIONAL_MAPPING.\n [pbauer]\n\n- Add tests\n [pbauer]\n\n\n1.0a2 (2015-11-04)\n------------------\n\n- Localize datetime\n [pbauer]\n\n- Prevent uneven dimension of data-dict\n [pbauer]\n\n- Fix blacklist\n [pbauer]\n\n\n1.0a1 (2015-11-04)\n------------------\n\n- Get content from all languages.\n [pbauer]\n\n- Add export for multiple images and files related with RelationList.\n [pbauer]\n\n- Allow choosing blacklisted fields from the fields of the selected type.\n [pbauer]\n\n- Use http://docs.python-tablib.org for most exports.\n [pbauer]\n\n- Add German translations.\n [pbauer]\n\n- Moved initial code from client-project to github.\n [pbauer]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/collective.contentexport", "keywords": "Python Plone", "license": "GPL version 2", "maintainer": "", "maintainer_email": "", "name": "collective.contentexport", "package_url": "https://pypi.org/project/collective.contentexport/", "platform": "", "project_url": "https://pypi.org/project/collective.contentexport/", "project_urls": { "Homepage": "https://pypi.python.org/pypi/collective.contentexport" }, "release_url": "https://pypi.org/project/collective.contentexport/1.1/", "requires_dist": null, "requires_python": "", "summary": "Plone add-on to export dexterity content in various formats", "version": "1.1" }, "last_serial": 3710141, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3294fd341a189fbab2b655b6589ce7d5", "sha256": "23f1912d429e677635fce050b088362c04f5756ea5264619772a4f2cb5650333" }, "downloads": -1, "filename": "collective.contentexport-1.0.tar.gz", "has_sig": false, "md5_digest": "3294fd341a189fbab2b655b6589ce7d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125478, "upload_time": "2016-07-09T08:50:18", "url": "https://files.pythonhosted.org/packages/c7/a8/c2002fb989a8167a289e95163e6a4894c76f477c16457c4a2cfa8151eadb/collective.contentexport-1.0.tar.gz" } ], "1.0a1": [ { "comment_text": "", "digests": { "md5": "6e3596d129677e027137ca7e1b39e7a6", "sha256": "b42450e8b13cb74b2e1799a37234f6d712d8f50db7119aa7912e9c97579fe32b" }, "downloads": -1, "filename": "collective.contentexport-1.0a1.tar.gz", "has_sig": false, "md5_digest": "6e3596d129677e027137ca7e1b39e7a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21106, "upload_time": "2015-11-04T15:30:26", "url": "https://files.pythonhosted.org/packages/4f/e7/6f8a894664ec8df98b82c6bc1834b3a633b3ea6d61d24b78fcf0ce3a6c8e/collective.contentexport-1.0a1.tar.gz" } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "bd7db0829a2682e4b514072c5239b212", "sha256": "4d994eb8a6806e17afa60af032c4687529a4a939dc8b1da4961486832186da30" }, "downloads": -1, "filename": "collective.contentexport-1.0a2.tar.gz", "has_sig": false, "md5_digest": "bd7db0829a2682e4b514072c5239b212", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21291, "upload_time": "2015-11-04T19:15:31", "url": "https://files.pythonhosted.org/packages/84/e4/372451ac6bb2f303dd7cd59c8b981fdb5f365f205fd741da59d41086757b/collective.contentexport-1.0a2.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "84ada1d5c079cc25c23532b2af96d27d", "sha256": "45dc5367bf8d84008c82eaf992d428e831053897034432e1fe230481dd985253" }, "downloads": -1, "filename": "collective.contentexport-1.0b1.tar.gz", "has_sig": false, "md5_digest": "84ada1d5c079cc25c23532b2af96d27d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24823, "upload_time": "2015-11-05T16:54:46", "url": "https://files.pythonhosted.org/packages/eb/b2/a2479080b93d45809757753c83cac9078ad5d325604b919375da0bf981b8/collective.contentexport-1.0b1.tar.gz" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "26ff90af1654eba2f313caf9888b7b57", "sha256": "2b87e404767cc9655101a017cabc5dcf99e62b03b924148884bdbe9769f50a73" }, "downloads": -1, "filename": "collective.contentexport-1.0b2.tar.gz", "has_sig": false, "md5_digest": "26ff90af1654eba2f313caf9888b7b57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 123820, "upload_time": "2015-11-06T11:46:49", "url": "https://files.pythonhosted.org/packages/91/e1/501c072baf31b9c67c90f2d53eff1e664c0e5e38988ad79058b984d1471f/collective.contentexport-1.0b2.tar.gz" } ], "1.0b3": [ { "comment_text": "", "digests": { "md5": "7eaa0289cc2fa2ccf43e77a3449d689b", "sha256": "fbe20ee74769a2c7722350be344a12767c72da788e6a795ead2821ab8ea6a1b9" }, "downloads": -1, "filename": "collective.contentexport-1.0b3.tar.gz", "has_sig": false, "md5_digest": "7eaa0289cc2fa2ccf43e77a3449d689b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 124457, "upload_time": "2015-11-28T07:46:49", "url": "https://files.pythonhosted.org/packages/5f/a1/0a3bf8b0c254860d66c606efb2f2e2abe047682d230b5726e30db878df9f/collective.contentexport-1.0b3.tar.gz" } ], "1.0b4": [ { "comment_text": "", "digests": { "md5": "191c590a9d09b5227038e3d18f9c5067", "sha256": "7283cfe9e7b2a6dfdd91446b0f33b2f37c4455635409da406d2b5220b7bf4c49" }, "downloads": -1, "filename": "collective.contentexport-1.0b4.tar.gz", "has_sig": false, "md5_digest": "191c590a9d09b5227038e3d18f9c5067", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125790, "upload_time": "2015-11-28T12:16:20", "url": "https://files.pythonhosted.org/packages/37/0a/663c8fde80cc00f2c6907518efbeeb5934b74803c5cfb4c2e955aac8d382/collective.contentexport-1.0b4.tar.gz" } ], "1.0b5": [ { "comment_text": "", "digests": { "md5": "c17345ba2757af97fee760d2fd064685", "sha256": "f57814b9daae255cf47043f49538c39415ce26b2be8642c8d3bde7a33a68473d" }, "downloads": -1, "filename": "collective.contentexport-1.0b5.tar.gz", "has_sig": false, "md5_digest": "c17345ba2757af97fee760d2fd064685", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 126213, "upload_time": "2015-12-03T10:45:39", "url": "https://files.pythonhosted.org/packages/fc/3b/5774f5b5635e7b34c9bea0c4119c93f30e7ee10c5b792980bc127443c0e3/collective.contentexport-1.0b5.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "06025348850c1e405e55cdfb17bb8be3", "sha256": "f45828829f35d680b60d7a5c31ab8022163380258b09d07be42841228317d35b" }, "downloads": -1, "filename": "collective.contentexport-1.1.tar.gz", "has_sig": false, "md5_digest": "06025348850c1e405e55cdfb17bb8be3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125887, "upload_time": "2018-03-27T12:38:18", "url": "https://files.pythonhosted.org/packages/9e/41/d8dae4820f5332d3d6b9b8f89da39799a4161834d15712f80f84cd202716/collective.contentexport-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "06025348850c1e405e55cdfb17bb8be3", "sha256": "f45828829f35d680b60d7a5c31ab8022163380258b09d07be42841228317d35b" }, "downloads": -1, "filename": "collective.contentexport-1.1.tar.gz", "has_sig": false, "md5_digest": "06025348850c1e405e55cdfb17bb8be3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 125887, "upload_time": "2018-03-27T12:38:18", "url": "https://files.pythonhosted.org/packages/9e/41/d8dae4820f5332d3d6b9b8f89da39799a4161834d15712f80f84cd202716/collective.contentexport-1.1.tar.gz" } ] }