{ "info": { "author": "Tictail", "author_email": "tech+pip-urlreplacer@tictail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7" ], "description": "Library for replacing emails and urls in plain text messages\n============================================================\n\nTo parse your text use :code:`urlreplacer.urls` or/and :code:`urlreplacer.emails`. They will only find urls and emails which has a known TLD; meaning example.com will match but example.ujh will not.\n\nInstallation:\n-------------\n\n.. code::\n\n $ pip install urlreplacer\n\n\nUsage\n=====\n\n.. code:: python\n\n from urlreplacer import urls, emails\n\n message = \"\"\"Hi!\n Please try example.com/one.html, test.com or test.com/a/?b=1.\n Or email me john@example.com! Bye.\n \"\"\"\n\n # This will only parse for urls, emails will be left alone.\n parsed_message = urls(message)\n\n print(parsed_message)\n >>> Hi!\n >>> Please try , or .\n >>> Or email me john@example.com! Bye.\n\n # Now parse for emails, urls will be left alone.\n parsed_message = emails(parsed_message)\n\n print(parsed_message)\n >>> Hi!\n >>> Please try , or .\n >>> Or email me ! Bye.\n\nCustom marker function\n----------------------\n\nBy default it will surround all urls and emails with :code:`<>`. But you can also supply your own marker function to both :code:`urls()` and :code:`emails()`.\n\nExample:\n\n.. code:: python\n\n def marker(a, b):\n return u'{}'.format(a, b)\n\n parsed_message = urls('Is this the website: example.com?', marker)\n print(parsed_message)\n >>> Is this the website: example.com?\n\nContributing\n============\n\nThere is a makefile setup:\n\n- :code:`$ make install` - installs all requirements.\n- :code:`$ make test` - runs all tests under coverage\n- :code:`$ make clean` - cleans caches/.pyc etc.\n\nThere is also a script for updating the list with known TLDs.\n\n- :code:`$ make update_tlds`\n\nThis will update the :code:`urlreplacer/tlds.py` file with the latest list.\n\nLICENSE\n=======\n\nThe MIT License (MIT)\n\nCopyright (c) [2015] [Tictail]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tictail/urlreplacer", "keywords": "url,email,replace", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "urlreplacer", "package_url": "https://pypi.org/project/urlreplacer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/urlreplacer/", "project_urls": { "Homepage": "https://github.com/tictail/urlreplacer" }, "release_url": "https://pypi.org/project/urlreplacer/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Find and replace URLs in plain text messages", "version": "0.1.1" }, "last_serial": 1818759, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a1aa4e5dc7498274beee2d5ffc3fc6c5", "sha256": "1a13029c6dae99741b3c24e831a1d42cb4673e6ac83da1df934fbfd120536188" }, "downloads": -1, "filename": "urlreplacer-0.1.tar.gz", "has_sig": false, "md5_digest": "a1aa4e5dc7498274beee2d5ffc3fc6c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9739, "upload_time": "2015-11-12T13:53:13", "url": "https://files.pythonhosted.org/packages/aa/ce/8a334d77413fa7e8244dad66e3cf626be19ab103c208cb2214eaa09a157c/urlreplacer-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b6227ce8c28163fdb08eb4020f06c3e5", "sha256": "baf7c9af2a1a4f21c9533ba911d2bd6a804a6e746d09f3809c5230e310c23ddc" }, "downloads": -1, "filename": "urlreplacer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b6227ce8c28163fdb08eb4020f06c3e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9748, "upload_time": "2015-11-16T13:48:41", "url": "https://files.pythonhosted.org/packages/82/48/049e3dde975f544f436574f44c9141f3db5768fbcd6c95a5c59fe2830633/urlreplacer-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6227ce8c28163fdb08eb4020f06c3e5", "sha256": "baf7c9af2a1a4f21c9533ba911d2bd6a804a6e746d09f3809c5230e310c23ddc" }, "downloads": -1, "filename": "urlreplacer-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b6227ce8c28163fdb08eb4020f06c3e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9748, "upload_time": "2015-11-16T13:48:41", "url": "https://files.pythonhosted.org/packages/82/48/049e3dde975f544f436574f44c9141f3db5768fbcd6c95a5c59fe2830633/urlreplacer-0.1.1.tar.gz" } ] }