{ "info": { "author": "4teamwork AG", "author_email": "mailto:info@4teamwork.ch", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.1", "Framework :: Zope2", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Overview\n========\n\n``ftw.zipexport`` provides a generic solution to export data from plone\nin a zip archive.\n\nA user can export data with the \"Export as Zip\" action in document listings.\n\nInstall\n=======\n\n\nCompatibility\n-------------\n\nFor zipping files with a total size of over 4Gb python 2.7.4 is required.\n\nStep-by-Step\n------------\n\n- Add ``ftw.zipexport`` to your buildout configuration\n\n::\n\n [instance]\n eggs =\n ftw.zipexport\n\n- Run buildout\n\n- Install ``ftw.zipexport`` in portal_setup\n\nImplementation\n==============\n\nIn a first step we have to collect all data to zip.\nUse the IZipRepresentation interface for this task.\n\nThe get_files function returns a list of tuples. The tuples consist of two values.\nFirst a relative path under which the file should show up in the zip.\nSecond the data as eather a file or a stream.\n\n.. code:: python\n\n\tclass IZipRepresentation(Interface):\n\n\t def get_files(path_prefix='', recursive=True, toplevel=True):\n\nBy default we support basic data-types like folder and files.\nMore complex data-types require an own adapter for IZipRepresentation.\n\nFeel free to extend one of the predefined adapters:\n`Predefined representations `_\n\nThe data generated by our IZipRepresentation then gets delivered to the ZipGeneration helper class.\n\n.. code:: python\n\n\tclass ZipGenerator(object):\n\t\tdef add_file(file_path, file_pointer):\n\t\t\tZipps the file and adds it to the archive.\n\t\t\tIf large or many files are selected this function might take some time to execute.\n\n\t\tdef generate():\n\t\t\treturns a temp file holding the generated zip\n\nHere is the sample code of the described steps:\n\n.. code:: python\n\n\tfrom zope.component import getMultiAdapter\n\tfrom ftw.zipexport.generation import ZipGenerator\n\tfrom ftw.zipexport.interfaces import IZipRepresentation\n\n\tziprepresentation = getMultiAdapter((self.folder, self.request), interface=IZipRepresentation)\n\twith ZipGenerator() as zipgenerator:\n\t\tfor file_path, file_pointer in ziprepresentation.get_files():\n\t\t\tzipgenerator.add_file(file_path, file_pointer)\n\t\tgenerated_zip_pointer = zipgenerator.generate()\n\n\nThe download is handled in a standard BrowserView which plainly reads from the temp file.\nFor details check out the code:\n`zipexportview.py `_.\n\nCurrent supported data-types\n----------------------------\n\n* IFolderish\n* IFileContent\n* IDexterityItem with IPrimaryFieldInfo\n\nPath Normalization\n------------------\n\nPaths are automatically using Plone's ``IFileNameNormalizer``.\nIf you want to use a custom normalization, you can pass it to the ``ZipGenerator``:\n\n.. code:: python\n\n from ftw.zipexport.generation import ZipGenerator\n from Products.CMFPlone.utils import safe_unicode\n import re\n\n def normalize_path(path):\n path = safe_unicode(path).replace(u'\\\\', u'/')\n return re.sub(ur'[^\\w\\-.\\/]', u'', path)\n\n with ZipGenerator(path_normalizer=normalize_path) as zipgenerator:\n ...\n\nPass ``None`` to disable normalization completely:\n\n.. code:: python\n\n from ftw.zipexport.generation import ZipGenerator\n\n with ZipGenerator(path_normalizer=None) as zipgenerator:\n ...\n\n\n\n\nNice to have\n============\n\n* Multithreading\n\nLinks\n=====\n\n- Github: https://github.com/4teamwork/ftw.zipexport\n- Issues: https://github.com/4teamwork/ftw.zipexport/issues\n- Continuous integration: https://jenkins.4teamwork.ch/view/All/search/?q=ftw.zipexport\n\nCopyright\n=========\n\nThis package is copyright by `4teamwork `_.\n\n``ftw.zipexport`` is licensed under GNU General Public License, version 2.\n\nChangelog\n=========\n\n\n1.6.4 (2019-09-19)\n------------------\n\n- Fix doubled subfolders when a folder with umlaut in the title contains empty subfolders. [phgross]\n\n\n1.6.3 (2018-04-17)\n------------------\n\n- Allow IFolderish to specify a custom title via a property. [Rotonen]\n- Drop support for Plone 4.2. [mbaechtold]\n\n\n1.6.2 (2017-11-29)\n------------------\n\n- Remove wrong allowed check on context for zip selected view. [phgross]\n\n1.6.1 (2017-09-06)\n------------------\n\n- Fix encoding bug when zip filename contains umlauts. [phgross]\n\n\n1.6.0 (2017-08-17)\n------------------\n\n- Include empty folders by default and add possibility to deactivate this behavior. [elioschmutz]\n\n\n1.5.0 (2016-12-15)\n------------------\n\n- Drop official support for Python 2.6 [jone]\n\n\n1.4.0 (2016-12-12)\n------------------\n\n- Add events for the ZIP exports\n [Rotonen]\n\n\n1.3.1 (2016-02-09)\n------------------\n\n- Do not fail when exporting AT folders with titles containing umlauts\n [fRiSi]\n\n- Fall back to object.id in case filename is not set.\n [fRiSi]\n\n\n1.3.0 (2015-05-05)\n------------------\n\n- Normalize all paths added to the ZIP file.\n [jone]\n\n- Handle path encoding in ZIP.\n [jone]\n\n- Added check if fs has enough space to create the zip file.\n [lknoepfel]\n\n\n1.2.2 (2015-03-25)\n------------------\n\n- Fixed a bug in the file export which occurred if the file to be exported\n did not have a blob but an OFS file.\n [mbaechtold]\n\n\n1.2.1 (2014-06-05)\n------------------\n\n- Fixed metadata version in default profile.\n [lknoepfel]\n\n\n1.2.0 (2014-05-26)\n------------------\n\n- Added option to select multiple interfaces on which the export is available.\n [lknoepfel]\n\n- Added error message when the content is too big to zip.\n This happens when the ZIP64 isn't available and the content is bigger than 4GB.\n [lknoepfel]\n\n- Corrected error message when no zip-exportable content is selected.\n [lknoepfel]\n\n- Deny zipexport on unallowed content.\n [lknoepfel]\n\n- Include default AT image files.\n [jone]\n\n- Added French translation by I. Anthenien.\n [lknoepfel]\n\n\n1.1.1 (2013-11-21)\n------------------\n\n- Added handling for files with same filename.\n [lknoepfel]\n- Added a separate profile to install an additional zip-export document action.\n [deif]\n\n1.1.0 (2013-10-14)\n------------------\n\n- Added export limitation.\n [lknoepfel]\n- Fix encoding problem with nested folders containing umlauts in the title.\n [jone]\n\n\n1.0.0 (2013-09-13)\n------------------\n\n- Initial Development", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/4teamwork/ftw.zipexport", "keywords": "ftw zip export", "license": "GPL2", "maintainer": "Lukas Knoepfel", "maintainer_email": "", "name": "ftw.zipexport", "package_url": "https://pypi.org/project/ftw.zipexport/", "platform": "", "project_url": "https://pypi.org/project/ftw.zipexport/", "project_urls": { "Homepage": "https://github.com/4teamwork/ftw.zipexport" }, "release_url": "https://pypi.org/project/ftw.zipexport/1.6.4/", "requires_dist": null, "requires_python": "", "summary": "Zip export for Plone", "version": "1.6.4" }, "last_serial": 5855440, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "639ee68785d5cbaf9bd0e1717542f5f0", "sha256": "b0af2cc2c7079abe342024494a738e02c2c2b793d1dd2a4c888663baecab62a1" }, "downloads": -1, "filename": "ftw.zipexport-1.0.0.zip", "has_sig": false, "md5_digest": "639ee68785d5cbaf9bd0e1717542f5f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29490, "upload_time": "2013-09-13T11:19:26", "url": "https://files.pythonhosted.org/packages/8e/df/07ae49551af897d60cb26983980141497c57bb385f88530f7b2221415c94/ftw.zipexport-1.0.0.zip" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "a42c6c3719c7d805c7526dd60d7c2d1b", "sha256": "a111e5348fc37e475990d88199f5c5359d3ff33ce4cca6c0c1aaad1c0945586b" }, "downloads": -1, "filename": "ftw.zipexport-1.1.0.zip", "has_sig": false, "md5_digest": "a42c6c3719c7d805c7526dd60d7c2d1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35817, "upload_time": "2013-10-14T09:48:17", "url": "https://files.pythonhosted.org/packages/b8/2b/08b0394981cda79cb53dd34fbf34bc0081988a3cdef32a8b7bbbfea66d2a/ftw.zipexport-1.1.0.zip" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "ba36eead20994837bf5946ccc3c0d3ec", "sha256": "b8c31139b8d19a5b66df801ef05e5205163dbee43a9626381c74bbb5f85bf5db" }, "downloads": -1, "filename": "ftw.zipexport-1.1.1.zip", "has_sig": false, "md5_digest": "ba36eead20994837bf5946ccc3c0d3ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38066, "upload_time": "2013-11-21T13:23:40", "url": "https://files.pythonhosted.org/packages/ed/d0/29ecee47f349e647aab04d186da4281edaa03afdc85b9bc28ecd0fba0ae3/ftw.zipexport-1.1.1.zip" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0ae2406589ef7b1b887a1a9b10009cb2", "sha256": "ac932256db239c6af1e8e8180a4a3e446506d3bba1f65648da2ee2a9915c6dec" }, "downloads": -1, "filename": "ftw.zipexport-1.2.0.zip", "has_sig": false, "md5_digest": "0ae2406589ef7b1b887a1a9b10009cb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42139, "upload_time": "2014-05-26T07:32:33", "url": "https://files.pythonhosted.org/packages/80/9c/c98d430298b482c60223c799bd570e215dfe443942094d34ae2a08d1d7cb/ftw.zipexport-1.2.0.zip" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "a9f43a2852e4e1a00899e9860ecd85e4", "sha256": "b2006dd1261ecf69979eb63e1de9556ce928b93b5b3079ee8e44e088d1c540fe" }, "downloads": -1, "filename": "ftw.zipexport-1.2.1.zip", "has_sig": false, "md5_digest": "a9f43a2852e4e1a00899e9860ecd85e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42217, "upload_time": "2014-06-05T10:04:31", "url": "https://files.pythonhosted.org/packages/e0/c5/980412ced7855b17b2934a512035ec0e5d4ab23aa0d28d7084b1706622a1/ftw.zipexport-1.2.1.zip" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "a43dbfbd6a69c72a36ee4ed85f30a14e", "sha256": "06f0e6b2cfdf93f67454897c9259bfb7994e6bac332a5a667e019930c515248a" }, "downloads": -1, "filename": "ftw.zipexport-1.2.2.zip", "has_sig": false, "md5_digest": "a43dbfbd6a69c72a36ee4ed85f30a14e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42818, "upload_time": "2015-03-25T11:12:58", "url": "https://files.pythonhosted.org/packages/d5/f8/6319ad0af42de930e0df18a61d2e52b07cc27c7ad5dc741f69d7dff5a35d/ftw.zipexport-1.2.2.zip" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "32b0a6dae66633cf85c977bd6468d443", "sha256": "a77dc54c0eb00c5b9f3b5ac40d6b1997f99d730b6c417c8bd512c1f5f1277dc4" }, "downloads": -1, "filename": "ftw.zipexport-1.3.0.zip", "has_sig": false, "md5_digest": "32b0a6dae66633cf85c977bd6468d443", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45590, "upload_time": "2015-05-05T12:10:58", "url": "https://files.pythonhosted.org/packages/3f/92/4357173c41442ec3c446101271240f1c66711c3831cf444781dd3ce2ccbe/ftw.zipexport-1.3.0.zip" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "9d5dfaa1bdf80906f4e39592f13a2750", "sha256": "ddc29c92c554343a32aa6f4edef2daeae78b627fe1fab2e7b3ca8e057b9b3c05" }, "downloads": -1, "filename": "ftw.zipexport-1.3.1.tar.gz", "has_sig": false, "md5_digest": "9d5dfaa1bdf80906f4e39592f13a2750", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24036, "upload_time": "2016-02-09T13:39:30", "url": "https://files.pythonhosted.org/packages/a7/47/e4f7d7c089dd1f1e65b5b3582159368208cd2bc7d3d9e03fa572106cd661/ftw.zipexport-1.3.1.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "85d79c9c25db00bcceb7033a5ec16785", "sha256": "1206d7431e0f1b674b54946d598d1830af86bb63f9ea7ce751f89e70734cba98" }, "downloads": -1, "filename": "ftw.zipexport-1.4.0.tar.gz", "has_sig": false, "md5_digest": "85d79c9c25db00bcceb7033a5ec16785", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25174, "upload_time": "2016-12-12T10:39:33", "url": "https://files.pythonhosted.org/packages/0c/03/b6f55ef4a67223b21229d97ba0872e49fc6d813de4aadafd56bb14cb7e99/ftw.zipexport-1.4.0.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "afce9f0da108e03d1702e75d1b743cb8", "sha256": "93d6439ead93e1308aeda7cb1b650cea5604d52817078b70fa271aebe641314d" }, "downloads": -1, "filename": "ftw.zipexport-1.5.0.tar.gz", "has_sig": false, "md5_digest": "afce9f0da108e03d1702e75d1b743cb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25225, "upload_time": "2016-12-15T13:35:37", "url": "https://files.pythonhosted.org/packages/f2/b4/a2af0ceb680e842a3ece11b7a841b613d5013e0d66a84b7da194f79238a8/ftw.zipexport-1.5.0.tar.gz" } ], "1.6.0": [ { "comment_text": "", "digests": { "md5": "87c3dfa62fc41b5dc2349ad778147e06", "sha256": "f9d88b854ed85e036d8ddea099c208d0523e441e8a29301604ef377e30936f02" }, "downloads": -1, "filename": "ftw.zipexport-1.6.0.tar.gz", "has_sig": false, "md5_digest": "87c3dfa62fc41b5dc2349ad778147e06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25990, "upload_time": "2017-08-17T13:34:39", "url": "https://files.pythonhosted.org/packages/d8/76/49399980fa079e9f0a4a708487427ee74f86fe1531390694bdd52ce196d7/ftw.zipexport-1.6.0.tar.gz" } ], "1.6.1": [ { "comment_text": "", "digests": { "md5": "0b14e16ec711acf05d4b916a25862b0c", "sha256": "9a343fc401f79baf3f6a98452fb3daf4e00a57a448ecdbc93e609cc3e7b561c5" }, "downloads": -1, "filename": "ftw.zipexport-1.6.1.tar.gz", "has_sig": false, "md5_digest": "0b14e16ec711acf05d4b916a25862b0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26202, "upload_time": "2017-09-06T05:42:14", "url": "https://files.pythonhosted.org/packages/70/d7/92489bf50d1b74e80c7b4b318e4c66227bbf608f251c474f8ead6c25c573/ftw.zipexport-1.6.1.tar.gz" } ], "1.6.2": [ { "comment_text": "", "digests": { "md5": "8548563a62a84304c2d64b1b0d7dbfb5", "sha256": "d08916966437ddc2b71bd5d594808c091cf844c9bb0c83849877281ca4c5b273" }, "downloads": -1, "filename": "ftw.zipexport-1.6.2.tar.gz", "has_sig": false, "md5_digest": "8548563a62a84304c2d64b1b0d7dbfb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26314, "upload_time": "2017-11-29T17:10:11", "url": "https://files.pythonhosted.org/packages/8c/70/8669c774f17533c799f5b7617280a60546010d84a3030b943a071f437bb0/ftw.zipexport-1.6.2.tar.gz" } ], "1.6.3": [ { "comment_text": "", "digests": { "md5": "1cde44c910ecdb5232565347f4714b04", "sha256": "28f76797764d72ef2a2b65da46c94f5468dac0620f60e239ae5dd29e5b0fea45" }, "downloads": -1, "filename": "ftw.zipexport-1.6.3.tar.gz", "has_sig": false, "md5_digest": "1cde44c910ecdb5232565347f4714b04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28259, "upload_time": "2018-04-17T11:56:02", "url": "https://files.pythonhosted.org/packages/07/13/570565d9b36e1e232305a916c8b1dd6e39a85d70f14d6c295d59093ef19c/ftw.zipexport-1.6.3.tar.gz" } ], "1.6.4": [ { "comment_text": "", "digests": { "md5": "81b83416a1f53b5b3e19472ce5cee8a7", "sha256": "862ec3bfa9a56cbb433e416ad498e9f634ba1385b9edf6c5011627ed35d07209" }, "downloads": -1, "filename": "ftw.zipexport-1.6.4.tar.gz", "has_sig": false, "md5_digest": "81b83416a1f53b5b3e19472ce5cee8a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28657, "upload_time": "2019-09-19T10:22:36", "url": "https://files.pythonhosted.org/packages/4f/d9/9c5156d8599b0aafac8684739def36072b86e64a90de1a7df44e72a60e8a/ftw.zipexport-1.6.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81b83416a1f53b5b3e19472ce5cee8a7", "sha256": "862ec3bfa9a56cbb433e416ad498e9f634ba1385b9edf6c5011627ed35d07209" }, "downloads": -1, "filename": "ftw.zipexport-1.6.4.tar.gz", "has_sig": false, "md5_digest": "81b83416a1f53b5b3e19472ce5cee8a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28657, "upload_time": "2019-09-19T10:22:36", "url": "https://files.pythonhosted.org/packages/4f/d9/9c5156d8599b0aafac8684739def36072b86e64a90de1a7df44e72a60e8a/ftw.zipexport-1.6.4.tar.gz" } ] }