{ "info": { "author": "Matthew Wilkes", "author_email": "matthew@matthewwilkes.co.uk", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n============\n\nopenc.excludesearch is designed to make it possible for an administrator to easily mark content as being hidden to searches. \n\n\nNB: Requires dm's AdvancedQuery from http://www.dieter.handshake.de/pyprojects/zope/#AdvancedQuery\n\n\nFirst off, install myself::\n \n >>> self.addProduct(\"openc.excludesearch\")\n\n\nWe set up an object that will show in searches for \"foo\"::\n\n >>> self.folder.invokeFactory('Document', 'foo', 'Foo Page')\n 'foo'\n >>> self.folder['foo']\n \n >>> self.folder['foo'].setText(\"I am a foo object from foosville.\")\n\n\nWe name it foo for convenience::\n \n >>> foo = self.folder['foo']\n\n\nWe can see its text fine::\n \n >>> foo.getText()\n '

I am a foo object from foosville.

'\n >>> foo.reindexObject()\n\n\nIf we search for it, we find it::\n \n >>> app.plone.restrictedTraverse(\"queryCatalog\")({\"SearchableText\":\"foo\"})\n []\n\n\nOnce we activate the hiding functionality we don't::\n \n >>> foo.getField('hidesearch').get(foo)\n False\n >>> foo.getField('hidesearch').set(foo, value=True)\n >>> foo.reindexObject()\n >>> foo.getField('hidesearch').get(foo)\n True\n >>> app.plone.restrictedTraverse(\"queryCatalog\")({\"SearchableText\":\"foo\"})\n []\n\n\nThis is because it has a new marker interface::\n \n >>> from openc.excludesearch.interfaces import IExcludeFromSearch\n >>> IExcludeFromSearch(foo)\n \n\n\nIf we remove this marker, we find it again::\n \n >>> foo.getField('hidesearch').get(foo)\n True\n >>> foo.getField('hidesearch').set(foo, value=False)\n >>> foo.reindexObject()\n >>> foo.getField('hidesearch').get(foo)\n False\n >>> app.plone.restrictedTraverse(\"queryCatalog\")({\"SearchableText\":\"foo\"})\n []\n\n\nAs we no longer provide that interface::\n \n >>> IExcludeFromSearch(foo)\n Traceback (most recent call last):\n ...\n TypeError: ('Could not adapt', , )\n\nTodo\n====\n\n 1) Subclass/monkeypatch collections so they know to ignore things with the\n IExcludeFromSearch marker interface\n\nChangelog\n=========\n\n0.1 - Unreleased\n----------------\n\n* Doctest\n [MatthewWilkes]\n\n* Added an adapter for archetypes.schemaextended to add a boolean field to the\n settings schema of any AT content type that adds/removes the marker\n interface when used.\n [MatthewWilkes]\n\n* Customised the queryCatalog script in a skin layer to drop all results\n providing IExludeFromSearch using AdvancedQuery\n [MatthewWilkes]\n\n* Added a marker interface called IExcludeFromSearch\n [MatthewWilkes]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.open-comms.com", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "openc.excludesearch", "package_url": "https://pypi.org/project/openc.excludesearch/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/openc.excludesearch/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.open-comms.com" }, "release_url": "https://pypi.org/project/openc.excludesearch/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Excludes a subtree from search.", "version": "0.1.1" }, "last_serial": 795756, "releases": { "0.1": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6c8cfe5d704cc329c3241eecad6e9e4d", "sha256": "866e0216266d335f1ede7b0137d6ec38d7e8434a96ad46870de4d880569c7f54" }, "downloads": -1, "filename": "openc.excludesearch-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6c8cfe5d704cc329c3241eecad6e9e4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11799, "upload_time": "2008-05-02T11:32:03", "url": "https://files.pythonhosted.org/packages/4b/c0/55ef4fc44e8ef1f1510fc125b28e0c77547851e0bc1e274e698179ef5fe2/openc.excludesearch-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6c8cfe5d704cc329c3241eecad6e9e4d", "sha256": "866e0216266d335f1ede7b0137d6ec38d7e8434a96ad46870de4d880569c7f54" }, "downloads": -1, "filename": "openc.excludesearch-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6c8cfe5d704cc329c3241eecad6e9e4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11799, "upload_time": "2008-05-02T11:32:03", "url": "https://files.pythonhosted.org/packages/4b/c0/55ef4fc44e8ef1f1510fc125b28e0c77547851e0bc1e274e698179ef5fe2/openc.excludesearch-0.1.1.tar.gz" } ] }