{ "info": { "author": "Mark Fox", "author_email": "markpfox@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Internet" ], "description": "####\nXRay\n####\nXRay 1.0.0\n\nReleased: 29-May-2015\n\n.. image:: https://travis-ci.org/MarkMarine/XRay.svg?branch=master\n :target: https://travis-ci.org/MarkMarine/XRay\n \n\n========================================================================\nXRay: A Python message inspector for mentions, emoticons, and url links.\n========================================================================\n\nXRay is a message inspection tool that finds @mentions, (emoticons) and urls\ninside a string message, and provides string JSON for further processing by a\nchat client.\n\nXRay will follow links and get their url title, and find @mentions and emoticons\nof the format ASCII < 15 char, surrounded by parenthesis.\n\nInstallation\n------------\n\nXRay can be installed from pip by typing in the terminal::\n\n $ pip install xray\n\nAfter installation you can verify that XRay is installed properly by opening a\npython prompt and importing XRay::\n\n >>> import xray\n\nIf there are no errors, everything worked properly and you can now use the XRay\nlibrary. If you see a traceback or get an import error, you may need to run pip\nunder ``sudo`` or create a `virtual environment `_\nfor your project.\n\n\nGetting Started\n---------------\n\nAfter installation, the XRay library can be called to parse messages by using\nthe convenience method ``xray.get_all()`` or by instantiating class objects of\nthe ``xray.raygun.MessageParser`` class. Class objects for each of the special\nparsing items are available for subclassing or extension as well.\n\nThe response with be a JSON string with the contents of the special objects\nfound inside the message::\n\n Input: \"@chris you around?\"\n Return (string):\n {\n \"mentions\": [\n \"chris\"\n ]\n }\n\n Input: \"Good morning! (megusta) (coffee)\"\n Return (string):\n {\n \"emoticons\": [\n \"megusta\",\n \"coffee\"\n ]\n }\n\n\n Input: \"Olympics are starting soon; http://www.nbcolympics.com\"\n Return (string):\n {\n \"links\": [\n {\n \"url\": \"http://www.nbcolympics.com\",\n \"title\": \"NBC Olympics | Home of the 2016 Olympic Games in Rio\"\n }\n ]\n }\n\n\n Input: \"@bob @john (success) such a cool feature; https://twitter.com/jdorfman/status/430511497475670016\"\n Return (string):\n {\n \"mentions\": [\n \"bob\",\n \"john\"\n ],\n \"emoticons\": [\n \"success\"\n ]\n \"links\": [\n {\n \"url\": \"https://twitter.com/jdorfman/status/430511497475670016\",\n \"title\": \"Justin Dorfman on Twitter: \\\\\"nice @littlebigdetail from @HipChat (shows hex colors when pasted in chat). http://t.co/7cI6Gjy5pq\\\\\"\"\n }\n ]\n }\n\n@Mentions\n---------\n\n@mentions - A way to mention a user. Always starts with an '@' and ends when\nhitting a non-word character.\n\n`How mentions work `_\n\nEmoticons\n---------\n\nEmoticons - XRay parses for 'custom' emoticons which are ASCII strings, no\nlonger than 15 characters, contained in parenthesis. Here is a listing of them,\nbut XRay will find anything matching this pattern and return it as an emoticon.\nChecking the current list of emoticons supported is left to the implementation.\n\n`Emoticons `_\n\n\nURL Title Parsing\n-----------------\n\nParsing a url link for it's title is a respectively slow process, because the\nwhole html page is downloaded by all of the libraries that python uses for http\nrequests before the page is parsed for the title tags. Because a library can not\nknow how many requests are coming in at one time, multi-processing these\nrequests in parallel is left to the implementation of this library. A reference\ndesign that handles message requests for parsing with threading and a ZeroMQ\nlister and client is included in the repo under the multithreader folder.\n\nFull Documentation\n------------------\n\n`http://markmarine.github.io/XRay/ `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MarkMarine/xray/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "x_ray", "package_url": "https://pypi.org/project/x_ray/", "platform": "Posix; MacOS X", "project_url": "https://pypi.org/project/x_ray/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/MarkMarine/xray/" }, "release_url": "https://pypi.org/project/x_ray/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Chat parser discovering mentions, emoticons, and tags", "version": "1.0.1" }, "last_serial": 1568719, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "db1d3011c26c109fb7dcc588397d0d1d", "sha256": "ae912380bf07bf33140051e38757d27bda3bead2f884439e27bd8f283a4cccba" }, "downloads": -1, "filename": "x_ray-1.0.1.tar.gz", "has_sig": false, "md5_digest": "db1d3011c26c109fb7dcc588397d0d1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7103, "upload_time": "2015-05-30T05:09:30", "url": "https://files.pythonhosted.org/packages/74/90/7ff4098cbd8d019a925ff42635db8761dcdbeba6509dc04fddc382b1565d/x_ray-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db1d3011c26c109fb7dcc588397d0d1d", "sha256": "ae912380bf07bf33140051e38757d27bda3bead2f884439e27bd8f283a4cccba" }, "downloads": -1, "filename": "x_ray-1.0.1.tar.gz", "has_sig": false, "md5_digest": "db1d3011c26c109fb7dcc588397d0d1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7103, "upload_time": "2015-05-30T05:09:30", "url": "https://files.pythonhosted.org/packages/74/90/7ff4098cbd8d019a925ff42635db8761dcdbeba6509dc04fddc382b1565d/x_ray-1.0.1.tar.gz" } ] }