{ "info": { "author": "Jonas Baumann, 4teamwork GmbH", "author_email": "mailto:info@4teamwork.ch", "bugtrack_url": null, "classifiers": [ "Framework :: Plone :: 4.2", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.1", "Programming Language :: Python" ], "description": "collective.mtrsetup\n===================\n\ncollective.mtrsetup provides a GenericSetup extension for importing and\nexporting mimetypes to / from the mimetypes registry.\n\n\nHow to use\n----------\n\n- Add `collective.mtrsetup` as dependency to your `setup.py`\n- Add a zcml-include to your `configure.zcml` or `dependency.zcml`\n- Add a dependency to `profile-collective.mtrsetup:default` to your\n `metadata.xml` in your generic setup profile\n- Create a `mimetypes.xml` as showed below in your generic setup profile\n\n\n\nOpenOffice / Office 2007\n------------------------\n\nThere is a additional generic setup profile provided in this\npackage (`profile-collective.mtrsetup:default`) which adds icons for\nOpenOffice (with backwards compatiblity to StarOffice) and adds the\nalready used ms-office-icons to the new office 2007 mimetypes.\nThe official Office 2007 icons are not added because of the license.\n\n\n\nExamples\n--------\n\nHere are some examples of how to use it.\n\nSetup some testing stuff:\n\n >>> from collective.mtrsetup.tests.base import purge_registry\n >>> from collective.mtrsetup.tests.base import import_mimetypes_registry\n >>> from collective.mtrsetup.tests.base import export_mimetypes_registry\n >>> from zope.component.hooks import getSite\n\n >>> portal = getSite()\n >>> registry = portal.mimetypes_registry\n >>> purge_registry(registry)\n >>> len(registry.mimetypes())\n 0\n\n\nWe can add new mimetypes with a simple mimetype tag in a *mimetypes.xml* in our generic setup\nprofile:\n\n >>> filedata = \"\"\"\n ... \n ... \n ... \n ... \n ... \"\"\".strip()\n >>> import_mimetypes_registry(registry, filedata)\n [(20, 'mimetypes', 'Mimetype imported: ')]\n\nNow we have just one mimetype correctly configured\n\n >>> registry.list_mimetypes()\n ['image/any']\n >>> image_any = registry.lookup('image/any')\n >>> image_any\n (,)\n >>> print image_any[0].icon_path\n \u00e0ny.png\n\nNow we should be able to export the current configuration:\n\n >>> print export_mimetypes_registry(registry)\n \n \n \n \n\n\nWe can also just modify a existing one:\n\n >>> filedata = \"\"\"\n ... \n ... \n ... \n ... \"\"\".strip()\n >>> import_mimetypes_registry(registry, filedata)\n [(20, 'mimetypes', 'Mimetype imported: ')]\n\nThe above notiation just updates the mimetype record, where *image/any is the first\nmimetype*:\n\n >>> print export_mimetypes_registry(registry)\n \n \n \n \n\n\nFinally we can delete a mimetype by just adding the delete flag:\n\n >>> filedata = \"\"\"\n ... \n ... \n ... \n ... \"\"\".strip()\n >>> import_mimetypes_registry(registry, filedata)\n [(20, 'mimetypes', 'Mimetype imported: ')]\n >>> print export_mimetypes_registry(registry)\n \n \n\n\nYou have to add at least one mimetype, otherwise the import will fail:\n\n >>> filedata = \"\"\"\n ... \n ... \n ... \n ... \"\"\".strip()\n >>> import_mimetypes_registry(registry, filedata)\n [(30, 'mimetypes', u'Require attributes: \"mimetypes\" for '), (20, 'mimetypes', 'Mimetype imported: ')]\n\nChangelog\n=========\n\n1.6.0 (2019-10-23)\n------------------\n\n- Add Plone 5.1 support by replacing the old PloneTestCase with plone.app.testing [mathias.leimgruber]\n- Drop Plone 4.1 support [mathias.leimgruber]\n\n1.5.4 (2017-07-31)\n------------------\n\n- Remove z3c.autoinclude:includeDependencies. [jone]\n\n1.5.3 (2017-04-05)\n------------------\n\n- The mimetype values should be string not unicode,\n especially for the icon_path\n [ale-rt]\n\n\n1.5.2 (2014-06-20)\n------------------\n\n- Fixed mimetype icon URLs to be relative\n and not absolute from root\n [keul]\n\n\n1.5.1 (2014-01-02)\n------------------\n\n- Added xmind mimetype in example profile.\n [thomasdesvenain]\n\n\n1.5 (2013-08-26)\n----------------\n\n- Added mmap mimetype in example profile.\n [thomasdesvenain]\n\n\n1.4.1 (2012-12-21)\n------------------\n\n- Fixed release (fixed MANIFEST.in)\n [thomasdesvenain]\n\n\n1.4 (2012-12-21)\n----------------\n\n* Add csv mimetype in example profile.\n [thomasdesvenain]\n\n1.3\n---\n\n* Add rtf mimetype with icon in example profile.\n [thomasdesvenain]\n\n1.2\n---\n\n\n1.1\n---\n* In some Plone 3 setups \"GenericSetup.mimetypes Require attributes\"\n warning appears, fixed by adding all required attr to a mimetype record.\n [07.02.2011, mathias.leimgruber]\n\n* Added record for MS Project (Icon not included)\n [07.02.2011, mathias.leimgruber]\n\n1.0\n---\n\n* Updated MANIFEST.in: added docs directory to release\n [09.08.2010, jbaumann]\n\n\n1.0a2\n-----\n\n* Updated README.txt (rest)\n [12.04.2010, jbaumann]\n\n\n1.0a1\n-----\n\n* Added updates for OpenOffice mimetypes (added new icons) and for Office 2007\n mimetypes (using the old office-like icons).\n [12.04.2010, jbaumann]\n\n* Assuerd that the GS import/export adapter works on both, plone3 and plone4.\n Plone3's getToolByName returns the Tool, with plone4 it returns the Utility. The Tool and\n the Utility do not have the same interfaces and plone3 crashes when using the old-style\n utility interfaces for adapter registration - so we need to use a zcml:condition.\n [12.04.2010, jbaumann]\n\n* Implemented exporting, added tests\n [09.04.2010, jbaumann]\n\n* Improved testing system\n [09.04.2010, jbaumann]\n\n* Initial implementation\n [08.04.2010, jbaumann]", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/collective/collective.mtrsetup", "keywords": "generic setup gs mimetypes registry import export", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "collective.mtrsetup", "package_url": "https://pypi.org/project/collective.mtrsetup/", "platform": "", "project_url": "https://pypi.org/project/collective.mtrsetup/", "project_urls": { "Homepage": "https://github.com/collective/collective.mtrsetup" }, "release_url": "https://pypi.org/project/collective.mtrsetup/1.6.0/", "requires_dist": null, "requires_python": "", "summary": "Extension for GenericSetup, adding support for import / export of mimetypes_registry", "version": "1.6.0", "yanked": false, "yanked_reason": null }, "last_serial": 13253365, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "80e75f77518061b7b014c32a3b381966", "sha256": "ae7421b1918aeb44a64a40e0391dba2bd61a48dea15eff25610a622e4bd01752" }, "downloads": -1, "filename": "collective.mtrsetup-1.0.tar.gz", "has_sig": false, "md5_digest": "80e75f77518061b7b014c32a3b381966", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18352, "upload_time": "2010-08-09T08:30:45", "upload_time_iso_8601": "2010-08-09T08:30:45.625946Z", "url": "https://files.pythonhosted.org/packages/ea/19/b43360dd2c9378295b404018e496f5826b2579d653a79fb4f08ff0c11db6/collective.mtrsetup-1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0a1": [ { "comment_text": "", "digests": { "md5": "01f094b4a295c60ce2cdb726574b5929", "sha256": "c6416d4593c43dbcf2065009e04d597908a75b83cf486b09f48972e2929e8b58" }, "downloads": -1, "filename": "collective.mtrsetup-1.0a1-py2.4.egg", "has_sig": false, "md5_digest": "01f094b4a295c60ce2cdb726574b5929", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 14121, "upload_time": "2010-04-12T13:16:39", "upload_time_iso_8601": "2010-04-12T13:16:39.429837Z", "url": "https://files.pythonhosted.org/packages/64/ea/1da0a8c2f07ef5217dabd774ea7f836a1537177597846e2258dd4c6c1de9/collective.mtrsetup-1.0a1-py2.4.egg", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b3aec80f526f0e54ca01411c585b2846", "sha256": "7b998d5870f6b00c261ce310544d91d8a39686d34914ef70caea419adafcef40" }, "downloads": -1, "filename": "collective.mtrsetup-1.0a1.tar.gz", "has_sig": false, "md5_digest": "b3aec80f526f0e54ca01411c585b2846", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6361, "upload_time": "2010-04-12T13:16:38", "upload_time_iso_8601": "2010-04-12T13:16:38.921741Z", "url": "https://files.pythonhosted.org/packages/5c/04/dd49b8541cc194aeaa87f05a4442c4dec5d83c98b7d1cb7e96cb04fffccd/collective.mtrsetup-1.0a1.tar.gz", "yanked": false, "yanked_reason": null } ], "1.0a2": [ { "comment_text": "", "digests": { "md5": "4aa5dae28f63d848c7debf85d65077f1", "sha256": "695dc004ba383ba83124ab67468239d532775676a30c83d61e33208dba7efdd4" }, "downloads": -1, "filename": "collective.mtrsetup-1.0a2-py2.4.egg", "has_sig": false, "md5_digest": "4aa5dae28f63d848c7debf85d65077f1", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 36111, "upload_time": "2010-04-12T13:45:19", "upload_time_iso_8601": "2010-04-12T13:45:19.113211Z", "url": "https://files.pythonhosted.org/packages/33/76/41dad4959775c2da50df38ea481ab3d29fb7469e1972ea71c73681db3b7a/collective.mtrsetup-1.0a2-py2.4.egg", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "6610b620f6afa393ffbc0aa11a36a39b", "sha256": "b403aa3f7395e1b8c1ea36ed1141e973fc52c5996154460501f8c6ef8d0c395b" }, "downloads": -1, "filename": "collective.mtrsetup-1.0a2.tar.gz", "has_sig": false, "md5_digest": "6610b620f6afa393ffbc0aa11a36a39b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19930, "upload_time": "2010-04-12T13:45:18", "upload_time_iso_8601": "2010-04-12T13:45:18.647702Z", "url": "https://files.pythonhosted.org/packages/b3/3c/8fc4c3e9e79d139735d0594a064be56852897ca9c24692f5b6cc6d7e4c24/collective.mtrsetup-1.0a2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.2": [ { "comment_text": "", "digests": { "md5": "2ab59bbcca8fa10cb3b103a9080a80d6", "sha256": "48168c3bdb0625fda7aa2b0d9dd6ba8e43cafa79e30dfbebfed90802859a21df" }, "downloads": -1, "filename": "collective.mtrsetup-1.2.tar.gz", "has_sig": false, "md5_digest": "2ab59bbcca8fa10cb3b103a9080a80d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20777, "upload_time": "2011-04-06T09:19:09", "upload_time_iso_8601": "2011-04-06T09:19:09.411102Z", "url": "https://files.pythonhosted.org/packages/b1/63/a3fd6d7bb9eb5fe6e067f4e14c1a3cfb78aff324e19c94805a57f1d07e2d/collective.mtrsetup-1.2.tar.gz", "yanked": false, "yanked_reason": null } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "40a894ccc20cad4732f0fa5caad31ae6", "sha256": "7017b98974c6cfa5ae920a5092a59c20157c033b24b09598b26f4fb3ec0cf75c" }, "downloads": -1, "filename": "collective.mtrsetup-1.4.1.zip", "has_sig": false, "md5_digest": "40a894ccc20cad4732f0fa5caad31ae6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36322, "upload_time": "2012-12-21T16:11:41", "upload_time_iso_8601": "2012-12-21T16:11:41.682529Z", "url": "https://files.pythonhosted.org/packages/8b/b8/6d3bc6eeb6e1e38952a082356dd2e950d87c855af74fef28ac44efca3ce5/collective.mtrsetup-1.4.1.zip", "yanked": false, "yanked_reason": null } ], "1.5": [ { "comment_text": "", "digests": { "md5": "e2ef5f028ee5aa7aa05536c547656837", "sha256": "a84181c278d17bf70f7766ee9cf0f0f0279cb3c70c7267f3f357638eb6bbedec" }, "downloads": -1, "filename": "collective.mtrsetup-1.5.zip", "has_sig": false, "md5_digest": "e2ef5f028ee5aa7aa05536c547656837", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35789, "upload_time": "2013-08-26T14:05:27", "upload_time_iso_8601": "2013-08-26T14:05:27.746961Z", "url": "https://files.pythonhosted.org/packages/e2/65/54816f993e4ea794fc87a193e96f136bb7c4c0a536901ba7bb081031cbf9/collective.mtrsetup-1.5.zip", "yanked": false, "yanked_reason": null } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "f1dc8b6601e0f9ec9bd613647cd69b27", "sha256": "ac7d1ea3275f00d909251032daeaf74020c69c4adbe7e87ae8a0faf532b200de" }, "downloads": -1, "filename": "collective.mtrsetup-1.5.1.zip", "has_sig": false, "md5_digest": "f1dc8b6601e0f9ec9bd613647cd69b27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36024, "upload_time": "2014-01-02T11:48:13", "upload_time_iso_8601": "2014-01-02T11:48:13.885556Z", "url": "https://files.pythonhosted.org/packages/9b/0a/2d53a46b83259be480c9489c77cdfb3417593b6c5eee258f23f3e69a410e/collective.mtrsetup-1.5.1.zip", "yanked": false, "yanked_reason": null } ], "1.5.2": [ { "comment_text": "", "digests": { "md5": "04b0b15b0b415c979dcad594dffe2afb", "sha256": "2208f79392d74402e00cfeac2deffe2633493454bde80eb7c5aaed018d0a0419" }, "downloads": -1, "filename": "collective.mtrsetup-1.5.2.zip", "has_sig": false, "md5_digest": "04b0b15b0b415c979dcad594dffe2afb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36177, "upload_time": "2014-06-20T06:53:03", "upload_time_iso_8601": "2014-06-20T06:53:03.359954Z", "url": "https://files.pythonhosted.org/packages/40/6c/45715240f035f5810098e8316257736d0b5d02cdb4c6f6738380d0ef847b/collective.mtrsetup-1.5.2.zip", "yanked": false, "yanked_reason": null } ], "1.5.3": [ { "comment_text": "", "digests": { "md5": "7d7e799ac059be17903fb162776ac4b1", "sha256": "d14416e7ace1beca14487a93971cfd78a5aa400f84c3ffa49dd7546495b9cd73" }, "downloads": -1, "filename": "collective.mtrsetup-1.5.3.tar.gz", "has_sig": false, "md5_digest": "7d7e799ac059be17903fb162776ac4b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20228, "upload_time": "2017-04-05T09:42:23", "upload_time_iso_8601": "2017-04-05T09:42:23.757347Z", "url": "https://files.pythonhosted.org/packages/ab/e1/c77a6fb6fec08614bc7b1c6aaa80efe0351faa43fae06f02358580c6fe98/collective.mtrsetup-1.5.3.tar.gz", "yanked": false, "yanked_reason": null } ], "1.5.4": [ { "comment_text": "", "digests": { "md5": "9760ac9970d5d24ec09f1acee96dfe7f", "sha256": "6e3a8e73e1f93da73bae148eaaf8dcb835de50bdd65e4b6f031d27094d90e854" }, "downloads": -1, "filename": "collective.mtrsetup-1.5.4.tar.gz", "has_sig": false, "md5_digest": "9760ac9970d5d24ec09f1acee96dfe7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20196, "upload_time": "2017-07-31T08:29:55", "upload_time_iso_8601": "2017-07-31T08:29:55.561885Z", "url": "https://files.pythonhosted.org/packages/3e/66/40406814d7b914e7a0a670564cdb51825e0ba4c8de4d3a800d2e1bc1aaa9/collective.mtrsetup-1.5.4.tar.gz", "yanked": false, "yanked_reason": null } ], "1.6.0": [ { "comment_text": "", "digests": { "md5": "b71e91049b0bbc5d3b6f1763e99fae61", "sha256": "716a633926467265b1103f98fde46f213c7df04d037e73444266edcf5f455db7" }, "downloads": -1, "filename": "collective.mtrsetup-1.6.0.tar.gz", "has_sig": false, "md5_digest": "b71e91049b0bbc5d3b6f1763e99fae61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21728, "upload_time": "2019-10-23T06:02:07", "upload_time_iso_8601": "2019-10-23T06:02:07.566780Z", "url": "https://files.pythonhosted.org/packages/f7/33/c6a7a26d5475b93966082e013f2a00b2a01bd0c1965aa7b13a8deb8be96c/collective.mtrsetup-1.6.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b71e91049b0bbc5d3b6f1763e99fae61", "sha256": "716a633926467265b1103f98fde46f213c7df04d037e73444266edcf5f455db7" }, "downloads": -1, "filename": "collective.mtrsetup-1.6.0.tar.gz", "has_sig": false, "md5_digest": "b71e91049b0bbc5d3b6f1763e99fae61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21728, "upload_time": "2019-10-23T06:02:07", "upload_time_iso_8601": "2019-10-23T06:02:07.566780Z", "url": "https://files.pythonhosted.org/packages/f7/33/c6a7a26d5475b93966082e013f2a00b2a01bd0c1965aa7b13a8deb8be96c/collective.mtrsetup-1.6.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }