Twity Twitter Bot
Aug 28th, 2009 – 6:29 pm | Design

Well, I’ve developed a twitter bot, @Twity001, same as Della bot that provides with useful information.It’s an auto reply bot.So you have to send a direct reply message to this bot to get information.
The service Twity has provided so far including Weather Forecast, Stock Market and TV List. To get start, you have to follow @Twity001, then send it an @reply with the commands to get the info u need.
Here is a short commands manual for using Twity with correct formats.
Getting Help
Simply tweet @Twity001 ? or @Twity001 help to get the help list
Weather Forecast
@Twity001 weather city or
@Twity001 weather city,country or
@Twity001 weather city country
For example, if you want to know about the weather in Paris,send a @reply message with the format “@Twity001 weather Paris,France”.And Twity will reply u with the weather forecast of Paris in a few minutes.

Stock Market
@Twity001 stock Symbol or
@Twity001 stock Symbol Parameter
For example, if you want to know about the stock info of Google company,send a @reply message with the format “@Twity001 stock GOOG”.(PS.GOOG is the symbol of Google company.Check out here to find stock symbol) And Twity will reply u with the stock info of google company in a few minutes.

Besides,you can leave a parameter behind the symbol to get more detail about the stock.
Here is a lists of the parameter that can be used:
price
change
volume
avg_daily_volume or adv
exchange
market_cap or mc
book_value or bv
ebitda
dividend_per_share or dps
dividend_yield or dy
earnings_per_share or eps
52_week_high or 52wh
52_week_low or 52wl
50day_moving_avg or 50d
200day_moving_avg or 200d
price_earnings_ratio or per
price_earnings_growth_ratio or pegr
price_sales_ratio or psr
price_book_ratio or pbr
short_ratio or sr
For example,you can tweet “@Twity001 stock goog dps” or “@Twity001 stock goog dividend_per_share” to get the price sales ratio of Google stock

TV List
@Twity001 TV
Yes, tweet this message can you get the day’s TV Listings.Pretty easy,huh? Twity will according to your timezone in twitter and reply you the Listings.You can check or change your timezone in your twitter accout settings
How it works?
Well,Twity is developed in Python.With the help of Cron job of GAE(I upload this program to gae btw),the program get the latest reply messages from the bot’s twitter acount every minute.Analyzing these messages and fetching the info we need from other website.Then send the results back to the twitter.
Here is the source code of Twity:
Feel free to leave a comment or tweet me if u have any suggestion:)


