https://github.com/meyt/linkable-py
Detect URL, Email, Hashtag and Mention from plain-text and convert into HTML hyperlink.
https://github.com/meyt/linkable-py
Last synced: 3 months ago
JSON representation
Detect URL, Email, Hashtag and Mention from plain-text and convert into HTML hyperlink.
- Host: GitHub
- URL: https://github.com/meyt/linkable-py
- Owner: meyt
- License: mit
- Created: 2018-12-17T18:35:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-26T02:36:24.000Z (over 5 years ago)
- Last Synced: 2025-02-20T07:39:41.101Z (4 months ago)
- Language: Python
- Size: 77.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
linkable-py
===========.. image:: https://travis-ci.org/meyt/linkable-py.svg?branch=master
:target: https://travis-ci.org/meyt/linkable-py.. image:: https://coveralls.io/repos/github/meyt/linkable-py/badge.svg?branch=master
:target: https://coveralls.io/github/meyt/linkable-py?branch=master.. image:: https://img.shields.io/pypi/pyversions/linkable.svg
:target: https://pypi.python.org/pypi/linkableDetect URL, Email, Hashtag and Mention from plain-text and convert into HTML hyperlink.
Install
-------.. code-block:: bash
$ pip install linkable
Usage
=====Basic:
.. code-block:: python
from linkable import Linkable
text = 'This is test with a #hashtag from @linkable on github.com'
print(Linkable(text))Output:
.. code-block:: html
This is test with #hashtag from @linkable on github.com
Links list:
.. code-block:: python
from linkable import LinkableList
text = 'This is test with a #hashtag from @linkable on github.com'
print(LinkableList(text).links)Output:
.. code-block::
['#hashtag', '@linkable', 'github.com']