{ "info": { "author": "Gilles Lenfant", "author_email": "gilles.lenfant@alterway.fr", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python" ], "description": "=============\nPloneFilesZip\n=============\n\nBy the `Ingeniweb `_ team.\n\nAbout\n=====\n\nAdds a document action to folders (and folderish contents) that enables to\ndownload all files and images from archetypes based contents available from that\nfolder in a ZIP file.\n\nOptionally, the user may get the DC metadata of the contents that provide files\nin XML-RDF format in the ZIP file.\n\nZip archives inner structure\n============================\n\nAll files in the Zip archives are recorded in the path ::\n\n [rel_path \"/\"] content_id \"/\" field_id \"/\" file_name\n\nAll DC metadata in the Zip archives are recorded in the path ::\n\n [rel_path \"/\"] content_id \".rdf\"\n\nWith :\n\n* rel_path -- The relative path to the folderish that contains the content object.\n\n* content_id -- The id of a content that has a FileField or ImageField.\n\n* field_id -- The name of the FileField or ImageField.\n\n* file_name -- The original file name (as recorded in the field). An extension\n is provided if the original filename doesn't have one.\n\nRequirements\n============\n\n* Plone 2.0.5 or Plone 2.1 +\n\n* Archetypes 1.3.3 +\n\n* Any AT based content type with a FileField, ImageField, or\n AttachmentField. (ATContenTypes do the job)\n\nOptional products\n-----------------\n\n* ATContentTypes 0.2 +, on Plone 2.0.x\n\n* AttachmentField 1.3 + and AttachmentField based content types like PloneExFile\n\n* LinguaPlone 0.7 +. If LinguaPlone is detected, the user downloads the files\n from contents in preferred language.\n\nWarning\n-------\n\nFileSystemStorage users must upgrade to a version later than 2005/10/20.\n\nConfiguring\n===========\n\nAfter installing PloneZipFiles using the usual quick installer, you **must**\nopen the ``portal_fileszip`` tool in ZMI and follow the instructions from the\n**Overview** tab.\n\nYou may configure from the \"PloneFilesZip Settings\" control panel too.\n\nCustomizing\n===========\n\nCustom fields\n-------------\n\nYou can create and register your own retrivers for your custom fields. See\n``retrivers.py`` to see how we handle FileFields, ImageFields and\nAttachmentFields.\n\nBasically, you just need to provide a class that implements the\n'IFileRetriever' and register it like this ::\n\n try:\n from Products.PloneZipFiles import HAS_PLONE_FILES_ZIP\n except ImportError, e:\n HAS_PLONE_FILES_ZIP = False\n ...\n if HAS_PLONE_FILES_ZIP:\n from Products.PloneZipFiles.interfaces import IFieldRetriever\n from Products.PloneZipFiles.registry import GlobalRegistry\n\n class MyFieldRetriever:\n\n __implements__ = Products.IFieldRetriever\n\n field_type = 'my_field'\n\n def __init__(self, field, content):\n ...\n\n def fileName(self):\n ...\n\n def mimeType(self):\n ...\n\n def fileBody(self):\n ...\n\n GlobalRegistry.register(MyFieldRetriever)\n\nSee 'interfaces.py' for details about methods signatures and docs.\n\nCustom types\n------------\n\nMost AT based content don't need to provide specific support for\nPloneFilesZip. Anyway, if your content type does not support the standard AT\nschema interface (means that 'your_content.Schema().fields()' does not provide\nall fields), your code must include and register a custom type retriever like\nthis ::\n\n try:\n from Products.PloneZipFiles import HAS_PLONE_FILES_ZIP\n except ImportError, e:\n HAS_PLONE_FILES_ZIP = False\n ...\n if HAS_PLONE_FILES_ZIP:\n from Products.PloneZipFiles.interfaces import ITypeRetriever\n from Products.PloneZipFiles.registry import GlobalRegistry\n\n class MyTypeRetriever:\n\n __implements__ = Products.ITypeRetriever\n\n meta_type = 'my_type'\n\n def __init__(self, content):\n ...\n\n def getFieldRetrievers(self):\n ...\n\n GlobalRegistry.register(MyFieldRetriever)\n\nSee 'interfaces.py' for details about methods signatures and docs.\n\nYou can find an example of type retriever in the latest PloneArticle product.\n\nCustom inner structure policies\n-------------------------------\n\nYou can customize the way the files are organized into your zip archive.\n\nyou have to implement and register a ZipStructurePolicy class that implements a\ngetZipFilePath method, that builds inner file path from document container path,\nfile name and field path\n\ncontainer_path is the absolute path of the plone document where the file is\nstored field_path is the relative path of the file field into the document\nobject\n\nyou will include in your product a plone zip policy module like this ::\n\n from Products.PloneFilesZip.interfaces import IZipStructurePolicy\n from Products.PloneFilesZip.policies import AbstractZipStructurePolicy, PolicyRegistry\n\n class MyZipStructurePolicy(AbstractZipStructurePolicy):\n '''\n The inner structure of the zip file\n corresponds to the inner structure of the objects.\n '''\n\n __implements__ = (IZipStructurePolicy,)\n\n id = 'my_policy_id'\n label = \"Policy title\"\n label_msgid = 'my_policy_title_i18n_msgid'\n help = \"Policy help text\"\n help_msgid = \"my_policy_help_i18n_msgid\"\n\n\n def getZipFilePath(self,\n container_path=None,\n file_name=None,\n field_path=None,):\n ...\n\n PolicyRegistry.registerPolicy(MyZipStructurePolicy)\n\n\nSee 'interfaces.py' for details about methods signatures and docs.\n\nCopyright and license\n=====================\n\nCopyright (c) 2006 Ingeniweb SAS\n\nThis software is subject to the provisions of the GNU General Public License,\nVersion 2.0 (GPL). A copy of the GPL should accompany this distribution. THIS\nSOFTWARE IS PROVIDED \"AS IS\" AND ANY AND ALL EXPRESS OR IMPLIED WARRANTIES ARE\nDISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,\nMERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE\n\nSee the ``.../PloneFilesZip/LICENSE`` file that comes with this product.\n\nTesting\n=======\n\nPlease read ``.../PloneFilesZipe/tests/README.txt``\n\nDownload\n========\n\nAdd ``Products.PloneFilesZip`` in the ``eggs`` list of your Zope instance.\n\n\nSupport\n=======\n\nMail to `Ingeniweb support `_.\n\n`Donations `_\nare welcome for new features requests.\n\nCredits\n=======\n\n* `Gilles Lenfant `_, main developer\n* `Arthur Albano `_,\n Brasilian-Portugese translation\n* `Thomas Desvenain `_, policies developer\n\nFeedback\n========\n\nContributions are welcome too:\n\n* Report success/problems with other File like fields and storages (please\n provide configuration info, test cases and tracebacks with bug reports).\n\n* Provide translations for your native language.\n\nChange log\n==========\n\nTrunk\n-----\n\n* Eggification\n [glenfant]\n\n* Plone 3 support\n [glenfant]\n\n1.1.0RC2 - 2007/02/02\n---------------------\n\n* Fix a bug in file retrieving. Append arg (full=True) while creating BaseUnit\n to make sure we get the entire file and not a chunk file (clebeaupin)\n\n* Fix a bug on DeepZipStructurePolicy:getZipFilePath (add ``**kwargs`` on method)\n (clebeaupin)\n\n1.1.0RC1 - 2007/02/01\n---------------------\n\n* Add policy ``ContentZipStructurePolicy``\n\n* In regards to the new policies, files are renamed if they are duplicated in\n the same inner archive directory\n\n* Add policies to manage zip structure. Policy can be configured in configlet\n\n1.0.0 - 2006/10/16\n------------------\n\n* Added a configlet\n\n1.0.0RC1 - 2006/09/24\n---------------------\n\n* First public release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/Products.PloneFilesZip", "keywords": "plone files archives", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "Products.PloneFilesZip", "package_url": "https://pypi.org/project/Products.PloneFilesZip/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Products.PloneFilesZip/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/Products.PloneFilesZip" }, "release_url": "https://pypi.org/project/Products.PloneFilesZip/1.2.0b1/", "requires_dist": null, "requires_python": null, "summary": "PloneFilesZip provides a tool that let users download all files from a folder (recursively) in a ZIP archive", "version": "1.2.0b1" }, "last_serial": 758406, "releases": { "1.2.0b1": [ { "comment_text": "", "digests": { "md5": "cc001f02f4a31fc0f64f296b8a541119", "sha256": "0e0b638d23d9cce76f56da8ecc0f522459664d35be95cefe065a5e96fed0f961" }, "downloads": -1, "filename": "Products.PloneFilesZip-1.2.0b1.tar.gz", "has_sig": false, "md5_digest": "cc001f02f4a31fc0f64f296b8a541119", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 134270, "upload_time": "2010-10-29T11:58:55", "url": "https://files.pythonhosted.org/packages/52/50/ccee03a008c96c7eb25b65e921e452877d28fc64ac743f01f7bd6320ee38/Products.PloneFilesZip-1.2.0b1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cc001f02f4a31fc0f64f296b8a541119", "sha256": "0e0b638d23d9cce76f56da8ecc0f522459664d35be95cefe065a5e96fed0f961" }, "downloads": -1, "filename": "Products.PloneFilesZip-1.2.0b1.tar.gz", "has_sig": false, "md5_digest": "cc001f02f4a31fc0f64f296b8a541119", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 134270, "upload_time": "2010-10-29T11:58:55", "url": "https://files.pythonhosted.org/packages/52/50/ccee03a008c96c7eb25b65e921e452877d28fc64ac743f01f7bd6320ee38/Products.PloneFilesZip-1.2.0b1.tar.gz" } ] }