{ "info": { "author": "kiorky", "author_email": "kiorky@cryptelium.net", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Topic :: Software Development" ], "description": ".. contents::\n\nIntroduction\n==============\n\n- based on `quintagroup.portlet.cumulus`_\n\nThis package provides 2 new tagcloud based portlets\n\nWith\n\n * cache (refresh)\n * local path searches enhancements\n\nAnd for the 'custom portlet':\n\n * url customization for tag browsing\n\nUsage\n\n * Install \"Local Tag cloud (cumulus) portlet\" with QuickInstaller.\n * Select Local Tag Cloud (cumulus) portlet from Add portlet drop-down menu.\n * Provide your own values for portlet configuration if needed.\n * Save changes.\n\nSupported Plone version\n\n * 3.x\n\nRepository:\n\n `svn`_\n\n.. _quintagroup.portlet.cumulus: http://pypi.python.org/pypi/quintagroup.portlet.cumulus/\n.. _svn: http://svn.plone.org/svn/collective/collective.portlet.localcumulus/trunk\n\nCredits\n======================================\n|makinacom|_\n\n* `Planet Makina Corpus `_\n* `Contact us `_\n\n.. |makinacom| image:: http://depot.makina-corpus.org/public/logo.gif\n.. _makinacom: http://www.makina-corpus.com\n\n\n\n\n\ncollective.portlet.cumulus Installation\n=================================================================================\n\nTo install collective.portlet.cumulus into the global Python environment (or a workingenv),\nusing a traditional Zope 2 instance, you can do this:\n\n * When you're reading this you have probably already run ::\n\n ``easy_install collective.portlet.cumulus``. \n \n Find out how to install setuptools (and EasyInstall) here:\n http://peak.telecommunity.com/DevCenter/EasyInstall\n\n * If you are using Zope 2.9 (not 2.10), get `pythonproducts`_ and install it \n via::\n\n python setup.py install --home /path/to/instance\n\n into your Zope instance.\n\n * Create a file called ``collective.portlet.cumulus-configure.zcml`` in the\n ``/path/to/instance/etc/package-includes`` directory. The file\n should only contain this::\n\n \n\n.. _pythonproducts: http://plone.org/products/pythonproducts\n\n\nAlternatively, if you are using zc.buildout and the plone.recipe.zope2instance\nrecipe to manage your project, you can do this:\n\n * Add ``collective.portlet.cumulus`` to the list of eggs to install, e.g.::\n \n [buildout]\n ...\n eggs =\n ...\n collective.portlet.cumulus\n \n * Tell the plone.recipe.zope2instance recipe to install a ZCML slug::\n \n [instance]\n recipe = plone.recipe.zope2instance\n ...\n zcml =\n collective.portlet.cumulus\n \n * Re-run buildout, e.g. with::\n \n $ ./bin/buildout\n \nYou can skip the ZCML slug if you are going to explicitly include the package\nfrom another package's configure.zcml file.\n\n\nDetailed documentation\n============================\n\nThe local renderer and portlet objects\n-------------------------------------------\n\nAdding some content for testing searches\n::\n\n >>> self.setRoles(('Manager', ))\n >>> self.portal['front-page'].edit(subject=['global', 'tags'])\n >>> if1 = self.folder.invokeFactory('Folder', id='f1')\n >>> if2 = self.folder.invokeFactory('Folder', id='f2')\n >>> f1 = self.folder[if1]\n >>> f2 = self.folder[if2]\n >>> d1 = f1.invokeFactory('Document', id='blog-entry1')\n >>> d2 = f1.invokeFactory('Document', id='blog-entry2')\n >>> d3 = f2.invokeFactory('Document', id='blog-entry3')\n >>> d4 = f2.invokeFactory('Document', id='blog-entry4')\n >>> f1[d1].edit(subject=['blog', 'tags'])\n >>> f1[d2].edit(subject=['foo', 'bar'])\n >>> f2[d3].edit(subject=['toto', 'titi'])\n >>> f2[d4].edit(subject=['toto', 'tutu'])\n\n\n\nLooking for our adapter to be in place\n::\n\n >>> from collective.portlet.localcumulus.interfaces import ILocalTagsRetriever\n >>> from collective.portlet.localcumulus import catalog\n >>> data = catalog.DummyData()\n >>> data.refreshInterval = 1\n\n\nThis adapter takes a context and an Assigment as 'data' attribute\n::\n\n >>> retriever = ILocalTagsRetriever(f1)\n >>> retriever\n \n\nTrying to get the local tags of the f1 folder\n::\n\n >>> data.path = '/'.join(f1.getPhysicalPath())\n >>> retriever.data = data\n >>> print '\\n'.join(['%s %s %s'% i for i in retriever.getTags()])\n blog 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=blog\n foo 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=foo\n bar 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=bar\n tags 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=tags\n\nTrying to get the local tags of the f2 folder\n::\n\n >>> data.path = '/'.join(f2.getPhysicalPath())\n >>> print '\\n'.join(['%s %s %s'% i for i in retriever.getTags()])\n tutu 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f2&Subject:list=tutu\n titi 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f2&Subject:list=titi\n toto 2 http://nohost/plone/search?path=/plone/Members/test_user_1_/f2&Subject:list=toto\n\n\n\nIf we have a portlet without path, it goes system wide\n::\n\n >>> data.path = ''\n >>> print '\\n'.join(['%s %s %s'% i for i in retriever.getTags(data=data)])\n bar 1 http://nohost/plone/search?Subject:list=bar\n blog 1 http://nohost/plone/search?Subject:list=blog\n foo 1 http://nohost/plone/search?Subject:list=foo\n global 1 http://nohost/plone/search?Subject:list=global\n tags 2 http://nohost/plone/search?Subject:list=tags\n titi 1 http://nohost/plone/search?Subject:list=titi\n toto 2 http://nohost/plone/search?Subject:list=toto\n tutu 1 http://nohost/plone/search?Subject:list=tutu\n\n\nTesting cache\n::\n\n >>> import time\n >>> data.path = '/'.join(f2.getPhysicalPath())\n >>> data.refreshInterval = 10\n >>> [o[0] for o in retriever.getTags()]\n [u'tutu', u'titi', u'toto']\n >>> f2[d4].edit(subject=['toto', 'tutu', 'tata'])\n >>> [o[0] for o in retriever.getTags()]\n [u'tutu', u'titi', u'toto']\n >>> time.sleep(2)\n >>> [o[0] for o in retriever.getTags()]\n [u'tutu', u'titi', u'toto']\n\nAfter 11 seconds, cache life is up\n::\n\n >>> time.sleep(9)\n >>> [o[0] for o in retriever.getTags()]\n [u'tutu', u'titi', u'toto', u'tata']\n\n.. vim: set ft=rst:\n\n\nThe local custom portlet\n--------------------------\n\nThe custom portlet enables the user to format the url used to browse a tag instead to use the plone ``search_form`` as a default.\n\nTests\n~~~~~~~\nAdding some content for testing searches\n::\n\n >>> self.setRoles(('Manager', ))\n >>> self.portal['front-page'].edit(subject=['global', 'tags'])\n >>> if1 = self.folder.invokeFactory('Folder', id='f1')\n >>> if2 = self.folder.invokeFactory('Folder', id='f2')\n >>> f1 = self.folder[if1]\n >>> f2 = self.folder[if2]\n >>> d1 = f1.invokeFactory('Document', id='blog-entry1')\n >>> d2 = f1.invokeFactory('Document', id='blog-entry2')\n >>> d3 = f2.invokeFactory('Document', id='blog-entry3')\n >>> d4 = f2.invokeFactory('Document', id='blog-entry4')\n >>> f1[d1].edit(subject=['blog', 'tags'])\n >>> f1[d2].edit(subject=['foo', 'bar'])\n >>> f2[d3].edit(subject=['toto', 'titi'])\n >>> f2[d4].edit(subject=['toto', 'tutu'])\n\nLooking for our adapter to be in place\n::\n\n >>> from collective.portlet.localcumulus.interfaces import ICustomLocalTagsRetriever\n >>> from collective.portlet.localcumulus import catalog\n >>> data = catalog.DummyData()\n >>> data.refreshInterval = 1\n >>> data.path = '/'.join(f1.getPhysicalPath())\n\nThis adapter takes a context and an Assigment as 'data' attribute\n::\n\n >>> retriever = ICustomLocalTagsRetriever(f1)\n >>> retriever\n \n\nTrying to get the local tags of the f1 folder with no url, it will default to the localtag behaviour\n::\n\n >>> data.search_url = ''\n >>> retriever.data = data\n >>> print '\\n'.join(['%s %s %s'% i for i in retriever.getTags()])\n blog 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=blog\n foo 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=foo\n bar 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=bar\n tags 1 http://nohost/plone/search?path=/plone/Members/test_user_1_/f1&Subject:list=tags\n\n\nCustomize url with variables\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nWe can play with some variables in python dict-string formating style.\n\nIf we have an url without any parameters inside, it just appends the tag at the end\n::\n\n >>> [bool(catalog.NOT_SIMPLE_URL_RE.match(a)) for a in ['azerty', '()', '%(azerty)s', '%()', '%()s']]\n [False, False, True, False, False]\n >>> data.search_url = 'http://foo'\n >>> retriever.data = data\n >>> print '\\n'.join(['%s' % i for i in retriever.getTags()])\n [u'blog', 1, u'http://foo/blog&path=/plone/Members/test_user_1_/f1']\n [u'foo', 1, u'http://foo/foo&path=/plone/Members/test_user_1_/f1']\n [u'bar', 1, u'http://foo/bar&path=/plone/Members/test_user_1_/f1']\n [u'tags', 1, u'http://foo/tags&path=/plone/Members/test_user_1_/f1']\n\nThink that you'll surely have to add at least ``%(tag)s`` somewhere in your url to include the tag information ;).\n\nVariables avaiblable are:\n\n * *portal_path*: plone site path\n * *portal_url*: plone site url\n * *here_url*: context url\n * *here_path*: context path inside the ZODB\n * *tag*: the tag\n * *tag_weight*: weight of the tag\n\n::\n\n >>> data.search_url = '%(portal_url)s?path=%(portal_path)s&url=%(here_url)s&hpath=%(here_path)s&tag=%(tag)s&weight=%(tag_weight)s'\n >>> retriever.data = data\n >>> print '\\n'.join(['%s' % i for i in retriever.getTags()])\n [u'blog', 1, u'http://nohost/plone?path=/plone&url=http://nohost/plone/Members/test_user_1_/f1&hpath=/plone&tag=blog&weight=1']\n [u'foo', 1, u'http://nohost/plone?path=/plone&url=http://nohost/plone/Members/test_user_1_/f1&hpath=/plone&tag=foo&weight=1']\n [u'bar', 1, u'http://nohost/plone?path=/plone&url=http://nohost/plone/Members/test_user_1_/f1&hpath=/plone&tag=bar&weight=1']\n [u'tags', 1, u'http://nohost/plone?path=/plone&url=http://nohost/plone/Members/test_user_1_/f1&hpath=/plone&tag=tags&weight=1']\n\n.. vim: set ft=rst:\n\n\nChangelog\n=========\n\n1.5 - 2010-03-16\n------------------\n* bugfix: path in custom portlet [kiorky]\n\n1.4 - 2010-03-16\n------------------\n* grok fix (remove it, useless) [kiorky]\n* Fix tests.\n\n\n1.3 - Unreleased\n-------------------\n\n* honour path in custom portlet [kiorky]\n\n1.2 - 2010-02-08\n------------------\n\n* Add customizable portlet with special url to browse when a tag is chosen [kiorky]\n\n1.0 - 2010-01-18\n------------------\n\n* Initial release [kiorky]", "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/collective.portlet.localcumulus", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "collective.portlet.localcumulus", "package_url": "https://pypi.org/project/collective.portlet.localcumulus/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.portlet.localcumulus/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/collective.portlet.localcumulus" }, "release_url": "https://pypi.org/project/collective.portlet.localcumulus/1.8/", "requires_dist": null, "requires_python": null, "summary": "Project collective.portlet.localcumulus cumulus product by Makina Corpus", "version": "1.8" }, "last_serial": 788054, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "23632434421381da5975016fb643013d", "sha256": "da19009c8808bf8b39382cc055d175d66157b0de6602192e3ee14fdfb01b8f16" }, "downloads": -1, "filename": "collective.portlet.localcumulus-1.0.zip", "has_sig": false, "md5_digest": "23632434421381da5975016fb643013d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37272, "upload_time": "2010-01-18T19:02:19", "url": "https://files.pythonhosted.org/packages/1a/8b/81766ee527e7fd034d5d1d214f7bd869d0e1efd0d0ffcfd1f0c88d35f8cc/collective.portlet.localcumulus-1.0.zip" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "548b8c0052ffc7bcb04f53e74c14b2f8", "sha256": "77043d65dc27e276ae10c4d146b7fa2edf9458aafa1012acc3ee28ada45591bc" }, "downloads": -1, "filename": "collective.portlet.localcumulus-1.1.zip", "has_sig": false, "md5_digest": "548b8c0052ffc7bcb04f53e74c14b2f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37260, "upload_time": "2010-01-19T09:38:30", "url": "https://files.pythonhosted.org/packages/df/eb/eba31189e5076893f4a222dc7fe994a30656f63c5b82508f6a44805a6716/collective.portlet.localcumulus-1.1.zip" } ], "1.2": [], "1.4": [ { "comment_text": "", "digests": { "md5": "e10b40681eb6153fed726a4ff96f0604", "sha256": "93d912e3df2a4c5c3f6b4c6bc336fcdfa283d2bf1104c121f5ba0410cebe0335" }, "downloads": -1, "filename": "collective.portlet.localcumulus-1.4.zip", "has_sig": false, "md5_digest": "e10b40681eb6153fed726a4ff96f0604", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45651, "upload_time": "2010-03-16T14:58:41", "url": "https://files.pythonhosted.org/packages/4a/b9/3ef947907d10eac7f72732f0c8db8e04fe079a62f98d39ecd8da6e48cfcf/collective.portlet.localcumulus-1.4.zip" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "decd0cc7f362a172c31af495d940a7d7", "sha256": "d1715e00480769b43f34fb919cf473093986a54a320937f752a40284b20d2d52" }, "downloads": -1, "filename": "collective.portlet.localcumulus-1.5.zip", "has_sig": false, "md5_digest": "decd0cc7f362a172c31af495d940a7d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46155, "upload_time": "2010-06-28T16:24:26", "url": "https://files.pythonhosted.org/packages/96/99/4aa67297d55931a85c209031f5c79a0c2debe9d237bcf7cc189fb78bc2b9/collective.portlet.localcumulus-1.5.zip" } ], "1.8": [ { "comment_text": "", "digests": { "md5": "5ead751c21fbe2e0f76a9d8c1a2d133a", "sha256": "b94b75feca372ca0e3878ceaf08c2da0c44203a9a3aa281e1114e64c709ece6f" }, "downloads": -1, "filename": "collective.portlet.localcumulus-1.8.zip", "has_sig": false, "md5_digest": "5ead751c21fbe2e0f76a9d8c1a2d133a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46052, "upload_time": "2011-01-20T10:34:11", "url": "https://files.pythonhosted.org/packages/81/99/883a98225a6db2f981cd961924c4685f41e9a861da204db1a01dc377d067/collective.portlet.localcumulus-1.8.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ead751c21fbe2e0f76a9d8c1a2d133a", "sha256": "b94b75feca372ca0e3878ceaf08c2da0c44203a9a3aa281e1114e64c709ece6f" }, "downloads": -1, "filename": "collective.portlet.localcumulus-1.8.zip", "has_sig": false, "md5_digest": "5ead751c21fbe2e0f76a9d8c1a2d133a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46052, "upload_time": "2011-01-20T10:34:11", "url": "https://files.pythonhosted.org/packages/81/99/883a98225a6db2f981cd961924c4685f41e9a861da204db1a01dc377d067/collective.portlet.localcumulus-1.8.zip" } ] }