{ "info": { "author": "Jeff Hammel", "author_email": "k0scist@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "commentator\n===========\n\nWSGI commenting middleware\n\nTo use\n------\n\nMake a factory wrapping your app in the commentator middleware.\nCurrently, commentator only pickles comments. To the constructor of\nCommentator, pass a database (the path to the pickle) and a pattern.\nThe pattern is in the form of\n\n# -> URL\n\nThe URL pattern is a \n`python regular expression `_\nto match against the request's PATH_INFO. \n\nThe xpath pattern is where you want to place the comments on the\npage. See http://www.w3schools.com/XPath/ for more about xpath\nexpressions.\n\nThe URL is a \n`python string template `_\nthat is substituted for groups in the URL regular expression and\nelement attributes in the found nodes. The element attributes are\nreferenced by name (``${id}``, ``${class}``, etc) and the groups are\nreferenced by number (``${1}``, ...).\n\n\nExample\n-------\n\nA reference implementation is illustrated in the commentator.ini\nfile. This uses the pattern:\n\n ``commentator.pattern = (.*)#.//div[@id='comment_on_this'] -> ${1}``\n\nWhat this pattern says is\n\n * comment on every PATH_INFO ``(.*)``\n * append the rendered content template to ``div[@id='comment_on_this']``\n * reference the PATH_INFO as the canonical URL ``${1}``\n\nTo comment on every HTML page at the end of the body, you would use\n\n ``commentator.pattern = (.*)#.//body -> ${1}``\n\nA more complex example is in the ``.ini`` file, commented out, for use with\n`bitsyblog `_ :\n \n ``commentator.pattern = /blog/.*#.//div[@class='blog-entry'] -> /blog/${id}``\n\nThis pattern says:\n\n * comment on all paths under blog\n * put the comments at the end of each ``div[@class='blog-entry']``\n * get the URI from the ``div``'s id, not from the ``PATH_INFO``\n\n\nTODO\n----\n\nThis is very alpha. I'd be happy to work more on this if anyone wants\nit. A few outstanding issues:\n\n * fix weird lxml issue where you have to put .// for elements\n * allow commenting on multiple resources (multiple patterns per instance)\n * locking pickle files\n * fix couch....not sure what's wrong\n * allow use of CSS classes, not just xpath\n\n--\n\nhttp://k0s.org", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://k0s.org/hg/commentator", "keywords": null, "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "commentator", "package_url": "https://pypi.org/project/commentator/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/commentator/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://k0s.org/hg/commentator" }, "release_url": "https://pypi.org/project/commentator/0.1/", "requires_dist": null, "requires_python": null, "summary": "WSGI commenting middleware", "version": "0.1" }, "last_serial": 788324, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "48730b75e48be7d8cb9248ff0ba7748e", "sha256": "0898f004849eaab1fab72b0235721961a3df9d82a45b70347258b4cc2f72a950" }, "downloads": -1, "filename": "commentator-0.1.tar.gz", "has_sig": false, "md5_digest": "48730b75e48be7d8cb9248ff0ba7748e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5005, "upload_time": "2010-01-24T23:41:22", "url": "https://files.pythonhosted.org/packages/d8/8c/9519668b415d9bb7ccd4b56e00ec86d86b3049f7f68e1005b728a269e1c2/commentator-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "48730b75e48be7d8cb9248ff0ba7748e", "sha256": "0898f004849eaab1fab72b0235721961a3df9d82a45b70347258b4cc2f72a950" }, "downloads": -1, "filename": "commentator-0.1.tar.gz", "has_sig": false, "md5_digest": "48730b75e48be7d8cb9248ff0ba7748e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5005, "upload_time": "2010-01-24T23:41:22", "url": "https://files.pythonhosted.org/packages/d8/8c/9519668b415d9bb7ccd4b56e00ec86d86b3049f7f68e1005b728a269e1c2/commentator-0.1.tar.gz" } ] }