Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dpritchett
on March 28, 2012
|
parent
|
context
|
favorite
| on:
Jessamyn Smith: Fighting sexist jokes with a Pytho...
You can actually use a copy of her own talkbackbot to do just that. Just wire up your own trigger like so:
def contains_twsrs_response_quote(chat_line): return bool(re.search(r'~ [\w ]+$', chat_line))
Edit: This presumes the responses you're trying to detect match the form "Quote goes here ~ Author of Quote" seen in her quotes.txt.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: