Detect URL, Email, Hashtag and Mention from plain-text and convert into HTML hyperlink.
Project description
linkable-js
Detect URL, Email, Hashtag and Mention from plain-text and convert into HTML hyperlink.
Install
$ pip install linkable
Usage
Basic:
from linkable import Linkable
text = 'This is test with a #hashtag from @linkable on github.com'
print(Linkable(text))
Output:
This is test with <a href="/hashtag/#hashtag">#hashtag</a> from <a href="/@linkable">@linkable</a> on <a href="http://github.com">github.com</a>
Links list:
from linkable import LinkableList
text = 'This is test with a #hashtag from @linkable on github.com'
print(LinkableList(text).links)
Output:
['#hashtag', '@linkable', 'github.com']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
linkable-0.1.1.tar.gz
(4.2 kB
view hashes)