github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

BonsaiDen / twitter-text-python

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
    • 15
    • 2
  • Source
  • Commits
  • Network
  • Pull Requests (0)
  • Issues (0)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…
Downloads

Twitter text processing library (auto linking and extraction of usernames, lists and hashtags). Based on the Java implementation by Matt Sanford — Read more

  Cancel

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

fix for installing with setuptools. the find_packages fix did not work.. should have tested :) 
seanbrant (author)
Fri Sep 10 16:20:36 -0700 2010
BonsaiDen (committer)
Fri Sep 10 17:48:38 -0700 2010
commit  a6eb544a5925e9e2cb53
tree    53a26d5b0a92f079ef31
parent  183e55a05de054c84895
twitter-text-python /
name age
history
message
file .gitignore Sat Mar 27 02:36:23 -0700 2010 Ingore .pyc. [BonsaiDen]
file README.rst Loading commit data...
file setup.py
file tests.py
file ttp.py
README.rst

twitter-text-python

twitter-text-python is a Tweet parser and formatter for Python.

It is based on twitter-text-java and passes all the unittests of twitter-text-conformance plus some additional ones.

Usage:

>>> import ttp
>>> p = ttp.Parser()
>>> result = p.parse("@BonsaiDen Hey that's a great Tweet parser! #twp")
>>> result.reply
'BonsaiDen'
>>> result.users
['BonsaiDen']
>>> result.tags
['twp']
>>> result.urls
[]
>>> result.html
u'<a href="http://twitter.com/BonsaiDen">@BonsaiDen</a> Hey that\'s a great Tweet Parser!
<a href="http://search.twitter.com/search?q=%23twp">#twp</a>'

If you need different HTML output just subclass and override the format_* methods.

Contributing

The source is available on GitHub, to contribute to the project, fork it on GitHub and send a pull request. Everyone is welcome to make improvements to twp!

License

Copyright (c) 2010 Ivo Wetzel

twitter-text-python is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

twitter-text-python is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with twitter-text-python. If not, see <http://www.gnu.org/licenses/>.

Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • English
  • Deutsch
  • Français
  • 日本語
  • Português (BR)
  • Русский
  • 中文
  • See all available languages

Your current locale selection: English. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Русский
  • Српски
  • Svenska
  • 中文

Keyboard Shortcuts

Site wide shortcuts

s
Focus site search
?
Bring up this help dialog

Commit list

j
Move selected down
k
Move selected up
t
Open tree
p
Open parent
c or o or enter
Open commit

Pull request list

j
Move selected down
k
Move selected up
o or enter
Open issue

Issues

j
Move selected down
k
Move selected up
x
Toggle select target
o or enter
Open issue
I
Mark selected as read
U
Mark selected as unread
e
Close selected
y
Remove selected from view
c
Create issue
l
Create label
i
Back to inbox
u
Back to issues
/
Focus issues search

Network Graph

← or h
Scroll left
→ or l
Scroll right
↑ or k
Scroll up
↓ or j
Scroll down
t
Toggle visibility of head labels
shift ← or shift h
Scroll all the way left
shift → or shift l
Scroll all the way right
shift ↑ or shift k
Scroll all the way up
shift ↓ or shift j
Scroll all the way down