twitter single person reader

By eqrunner on Oct 10, 2009

a crued twitter reader.
command !twitter will post a specified twitter user's status

on !twitter command it sets some variables to be referenced later and executes the sockopen twitter

change sockwrite -n $sockname GET /statuses/user_timeline/14189511.rss to the twitter rss feed you would like it to read from. (go to the page you want to use and click on "rss feed" on the bottom of the right column to get the rss address)

in sockread, change
if (eqrunner isin %twitter_temp) {
to the user you are looking at.

what is happen, is it sends the rss feed to %twitter_temp, then looks in %twitter_temp and finds each eqrunner tag, then writes the line; removing the tags. and adding it to a twitter_desc.txt file. Line by line.
On sockclose reads the txt file and echos the first post ($read(twitter_Desc.txt, 1)) You can change that or add more lines to echo more.

let me know if there is a better way to accomplish this

for user submitted !twitter for anyone, check out my other script

;; twitter ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:TEXT:!twitter:#: {
  set %twitter_network $network
  set %twitter_chan $chan
  sockopen twitter 80

on *:sockopen:twitter:{
  set %twitter_name eqrunner
  sockwrite -n $sockname GET /statuses/user_timeline/14189511.rss
  sockwrite -n $sockname Host:
  sockwrite -n $sockname $crlf

on *:sockread:twitter: {
  sockread %twitter_temp
  if (<description> $+ %twitter_name isin %twitter_temp) { 
    set %twitter_Descline $remove(%twitter_temp,<description>,</description>)
    write -i twitter_Desc.txt %twitter_Descline

on *:sockclose:twitter: {
  msg %twitter_chan $read(twitter_Desc.txt, 1)
  unset %twitter*
  write -c twitter_Desc.txt


Sign in to comment.
Testor   -  Oct 10, 2009

on *":sockopen:twitter:{

Typo on the " ?

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.