TwitterAdium |
|
Submitted By Jesse Newland (jnewland) |
DescriptionVersion 1.1 requires your username, email, and password in your~/.twitter fileFollow updates to TwitterAdium on Twitter - http://twitter.com/twitteradium %_Twitter - this key, anywhere in Adium (away message, chat, profile, etc) will be replaced with your latest Twitter. USAGE
Changesv1.3 Feb 4, 2008
v1.2 May 7, 2007
v1.1 Mar 29, 2007
v1.0 Mar 21, 2007
v0.3 Mar 6, 2007
v0.2 Dec 6, 2006
v0.1
ImagesCommentsYou can reply to individual comments by clicking the "Reply" link next to each. # by gerwitz on 01/25/07 at 11:43:53nevermind, human error. I neglected to read the config file and see that I needed to enter the "number from my RSS feed".
I've also noticed that the email and password fields are not used from that file; I deleted them (makes me feel more secure) and this still works admirably. # by jnewland on 01/25/07 at 11:49:14Yeah, I should make that more obvious.
The email and password fields are used by some other scripts, including the Twitter Ruby Gem (http://twitter.rubyforge.org/), which I'm working on porting this plugin to use. What other twitter features would be useful in this plugin? # by ecable on 01/26/07 at 04:52:08hey all, just a note - this has totally stopped working for me, as has my launchbar twitting script - dunno WTFs up, but I'm not sure if it's this plugin or the Twitter API which is broken. Twitterific is all acting weird too...
# by gerwitz on 01/26/07 at 16:42:21> What other twitter features would be useful in this plugin?
Since you asked... my ideal setup: - When I connect, if I'm on a different network than last seen, set my status to my plazes.com location ("at %_Plazes"). - Reverse this script: tweet my Adium status to twitter whenever it changes (either manually or as a result of the aforementioned script). # by ericdfields on 01/30/07 at 23:51:31I followed the default instructions, saving the config after it popps up after the first %_Twitter, but it seems to not work after that. What's the next step I should take?
# by ericdfields on 01/30/07 at 23:56:48Well i missed the RSS thing as well. I put my ID in and set my status to '%_Twitter' but my status simply reads 'adium'
Any takers? # by ericdfields on 01/31/07 at 01:03:19Alright... i think twitter.com was just flippin out for a while. works beautifully now.
BTW... i highly recommend using this quicksilver action in combination with this adium plugin: http://blog.codahale.com/2007/01/15/t...uicksilver/ Set my Adium away message to be %_Twitter, type ctrl+space, [period], [message], tab, tw(autocompletes to 'twitter'), and BAM... IM and Twitter status are the same. Harmony. # by jnewland on 01/31/07 at 01:09:56Glad it's working for ya. I made some updates to that quicksilver action as well, and posted instructions for making it a trigger:
http://soylentfoo.jnewland.com/articl...quicksilver # by janit0r on 02/05/07 at 18:16:12Odd behavior: with a twitter status of text followed by URL (e.g. "anything is possible at http://www.zombo.com/"), the status displayed by Adium truncates after http (e.g. "anything is possible at http"). Statuses of equivalent length without URL are not truncated. Text parsing to blame?
Have any suggestions for troubleshooting? # by akatsuki on 02/11/07 at 14:50:47I would also almost prefer it to upload my status to twitter instead of downloading it.
# by Seeq on 02/12/07 at 04:48:39This script isn't working for me at all. I did everything the instruction said but no go.
# by hibiscusroto on 02/17/07 at 16:50:16OK, I'm able to update my Twitter via Adium, but am unable to get my Twitter to display as my status message in Adium. I have an away message setup like this...the title field and body are both set to "%_Twitter". Am I missing something? Any help would be appreciated.
# by billyd on 03/10/07 at 18:45:01I had problems getting this to work to. It turns out it only works if you have a public Twitter profile, so if you have "Protect my updates" checked in your Twitter settings, this xtra won't work.
Any chance we can get a version of this that uses the API to access private accounts? (If that's even at all possible) # by michaelrjohnson on 03/30/07 at 01:38:03I am having the same issue as hiscusroto. I've installed the newest version (v1.1), configured the .twitter file by sending "%_Twitter". Every time that I use the "%_Twitter" command, it just re-opens the configuration file.
What have I missed? Any help would be much appreciated. Thanks! # by jnewland on 03/30/07 at 01:40:27Michael - does your .twitter file have your username, email, and password in it? Please adjust it to contain all three.
# by michaelrjohnson on 03/30/07 at 01:43:42Yes, all information is correct. I even double-checked my password by logging out and into twitter.com.
# by jnewland on 03/30/07 at 09:12:17Michael - please contact me via aim at jbnewland or google talk at jnewland@gmail.com so I can investigate this further.
# by ecable on 04/02/07 at 17:28:00Comment for all those poor souls who were having it silently fail for them: until jesse gets it fixed, you can try removing the following line from the twitter.rb script itself, and see if that helps:
`require 'Time'` Maybe this will help somebody d-: # by bradgarland on 04/10/07 at 12:23:24Hey guys,
Talked w/ the author and if you're having the re-opening of the config file issue. The deal is the Twitter API updated again and you need to change your config file from saying 'userid:' and put in 'username:' then your shortname, not the numbers. (ie. bradgarland) Hope this helps somebody! Love the plugin. # by omnivector on 04/24/07 at 18:52:25Okay I'm confused -- How do make a status message in adium get pushed to twitter?
# by woeishyang on 09/14/07 at 00:04:02I have made a small fix that enables South Australian users (who also have the same time zone as CST) to use this script properly. Also added a tiny modification so each user on a multi user system has their temp files named differently.
Simply replace the contents of twitter.rb with the following: #TwitterAdium #Jesse Newland #jnewland@gmail.com require 'yaml' require 'rexml/document' require 'fileutils' require 'net/http' require 'timeout' require 'Time' #handle first run config file creation begin configfile = open(ENV["HOME"]+"/.twitter") config = YAML::load configfile rescue begin Fileutils.mv(ENV["HOME"]+"/.twitterc",ENV["HOME"]+"/.twitter") rescue template = # by woeishyang on 09/14/07 at 00:06:34Hmm...
Oh well, seems like the post got truncated. Simple change all instances of open(timefile,"w").write(Time.now.to_s) to open(timefile,"w").write(Time.now.strftime("%a %b %d %H:%M:%S %Y")) and replace the lines timefile = "/tmp/TwitterAdium.time" twitterfile = "/tmp/TwitterAdium.twitter" with timefile = "/tmp/.#{ENV["LOGNAME"]}_TwitterAdium.time" twitterfile = "/tmp/.#{ENV["LOGNAME"]}_TwitterAdium.twitter" Works great now :) # by kikollan on 11/30/07 at 12:22:37I would like to reduce the poll frequency (the time between requests to writter servers), because I am using twiterrific and the sum of the two is bigger than the limit of twitter servers (70 requests per hour)...
any idea?!? thanks in advance # by josephcp on 12/02/07 at 02:30:37I wanted to include status-update time and if you want to also, edit twitter.rb and replace the block "when Net::HTTPSuccess" with:
when Net::HTTPSuccess xmldoc = REXML::Document.new(response.body) timestring = Time.parse(xmldoc.root.elements["status[1]/created_at"].text) twitter = xmldoc.root.elements["status[1]/text"].text + "n" + Time.parse(xmldoc.root.elements["status[1]/created_at"].text).strftime("%a %b %d %I:%M%p %Z %Y") open(twitterfile,"w").write(twitter) puts twitter # by adam0101 on 02/04/08 at 10:43:09Is anyone else having a problem with leopard and adium 1.2.1 where the twitter plugin does not update the away message with "%_twitter". It relays the content from my twitter fine but just does not update until i change the away to something else and back to %_twitter.
Ideas? # by jnewland on 02/04/08 at 12:23:48Adam -
I haven't updated this plugin to work with the new Applescript setup yet. Will do that this AM and post a new version. # by adam0101 on 02/07/08 at 01:17:00I really appreciate the fast response, although this still does not seem to work for me. My away message status is still set to %_twitter. yet ill make an update to twitter remotely and come home to see if my away message has changed and it still has not.
# by hedbngr on 02/21/08 at 13:20:03I have the same exact problem. Twitteradium is also the only client I'm using.
# by biphenyl on 07/17/08 at 22:57:29My friend and I just started using TwitterAdium today and were having this problem. After a bit of debugging we determined that TwitterAdium was saving a new timestamp to its temp file every 30 seconds instead of every 120. This of course put it over the 70 requests/minute allowed by Twitter, so it was locking us out of the updates. We think the problem is related to how ruby was parsing the date saved in the temp file. We were able to solve it by replacing this block in ~/Library/Application Support/Adium 2.0/Scripts/Twitter.AdiumScripts/Contents/Resources/twitter.rb:
begin last = Time.parse(open(timefile).read).to_i last_twitter = open(twitterfile).read.to_s rescue last = Time.now.to_i open(timefile,"w").write(Time.now.strftime("%a %b %d %H:%M:%S %Y")) last_twitter = '' end if (Time.now.to_i - last.to_i) > 120 || last_twitter == '' open(timefile,"w").write(Time.now.to_s) else puts last_twitter exit(0) end with this block: begin last = open(timefile).read.to_i last_twitter = open(twitterfile).read.to_s rescue last = Time.now.to_i open(timefile,"w").write(Time.now.to_i) last_twitter = '' end if (Time.now.to_i - last.to_i) > 120 || last_twitter == '' open(timefile,"w").write(Time.now.to_i) else puts last_twitter exit(0) end This stores everything as a unix integer timestamp, so there's no question of how it's being parsed. Updates are now properly occurring once every two minutes and TwitterAdium is working correctly. # by tedger on 03/27/08 at 01:50:04I was wondering, could you strip tweets that are @ from the display, similar to the twitter facebook apps. I use twitter as a ubiquitous status, but I'd like to start using the "messaging" nature of it, but I can't really do both if the Adium script doesn't strip @ tweets.
# by dandiemer on 09/17/08 at 21:57:15I actually just patched this myself and it seems to work.
using the finder click Go than Go To Folder, then type ~/Library/Application Support/Scripts right click on Twitter.AdiumScripts and hit Show Package Contents, then navigate to Contents/Resources and edit the twitter.rb file with a text editor. Replace the following: open(twitterfile,"w").write(twitter) puts twitter with: if twitter.index('@') == 0 else open(twitterfile,"w").write(twitter) puts twitter end Lemme know if it works for you. # by friendartiste on 04/08/08 at 06:38:21I really like the script, but it needs a small security tweak. I was noticing the permissions on the .twitter file generated by the script are, by default, world readable. Although not inherently 'dangerous,' since the .twitter file stores the password as plain text, it would be nice to have the script fix the permissions so it couldn't be exploited.
# by haruki_zaemon on 05/04/08 at 12:27:01My file system is case-sensitive which means the require 'Time' needs to be require 'time' (lowercase 't') otherwise the script barfs. Changing to lowercase would mean it runs on all environments. Cheers, Simon.
# by broox on 05/12/08 at 18:55:39it would be nice if you could edit the frequency of updates in that YAML file. I've now got at least 7 apps hitting my twitter acconut, so being able to set it to like 5 minutes would be rad.
for now, I've just updated my local copy to poll every 5 minutes. in ~/.twitter i added: interval: 500 in ~/Library/Application Support/Adium 2.0/Scripts/Twitter.AdiumScripts/Contents/Resources/twitter.rb i added (just before the following comment halfway through the code: #store last twitter and timestamp): begin interval = (config["interval"] == nil || config["interval"] < 120) ? 120 : config["interval"] rescue interval = 120 end # by yanokwa on 06/11/08 at 00:44:08just seconding tedger's request. can you place strip the @ private messages?
# by dandiemer on 09/17/08 at 21:58:58Check my patch on http://www.adiumxtras.com/index.php?a...3484#c20195 and see if it works
# by abricko on 08/19/08 at 05:08:51I love this script. The only issue I have is that I wish it was smart enough to ignore replies that I write towards others. Seems like it would be simple enough to do just ignore / skip status update if the message contains @someword near the beginning
# by dandiemer on 09/17/08 at 21:59:23try out my patch http://www.adiumxtras.com/index.php?a...3484#c20195 and see if it works
# by stonemonk on 11/03/08 at 14:39:16grt script j, and thx also to dandiemer & biphenyl for the improvs, they have made this script usable for me. would be nice to see these included an update, as well as setting the permission on the .twitter file to 600 on 1st run...
# by a_JAguar on 02/19/09 at 10:37:38I install the Script but it doesn't run. When i type %_Twitter in nothing Pop up.
# by GhostFaction on 03/27/09 at 20:14:28Where is the .twitter file? I can't find it anywhere. I have to change my username since I can't get into my old Twitter account but I cant find the config file to do so. I changed the name in the .rb file but it did nothing. I even tried deleting/uninstalling this script but for some reason it saved my old username.
# by pixelauthor on 04/08/09 at 16:31:52This script works, but I'm having some issues with the twitter "maximum requests" error since I added it. How often does this script update?
# by pixelauthor on 04/10/09 at 14:17:49Yes, I'm replying to myself because I like to help people once I've solved my problem. Sorry, was having some issues because I'm running Nambu and this script at the same time. Twitter has an API refresh cap of 70 refreshes an hour, and I was running Nambu with dynamic refreshes. With that, AND this script updating every 2 minutes, it was overloading Twitter and I was getting locked out towards last third of every hour. There are several ways to solve this problem - here is what I did:
I didn't want to change my Nambu refresh rate, because that results in crappy updates for all my followed tweets. So I cracked open the twitter.rb file inside the Twitter.AdiumScripts package (right-click, and view package contents.) Around line 56 or so there's an "if" condition that controls the timer ("if (Time.now.to_i - last.to_i) > 120 || last_twitter == ''") The number 120 is the number of seconds between refreshes (correct me if I'm wrong). Change this number to the desired refresh rate. I changed mine to 900, to refresh on the quarter-hour. This means only 4 of my 70 hourly refreshes are used up, freeing 66 up for Nambu. Hope this helps someone - I know all you scripters are rolling your eyes at the obviousness of this info, but there are plenty out there with little or no scripting knowledge that may gain something from this. Cheers! # by IcyMidnight on 07/20/09 at 01:48:37In addition, the script seems to work without first logging into twitter. Comment out the line containing req.basic_auth config["username"], config["password"] and the script will still work without using up your precious API requests.
# by smithjo on 09/01/09 at 20:01:02Is this working in snow leopard? Doesn't seem to be pulling my latest tweets.
# by Ozy on 12/13/09 at 16:43:52The following version of twitter.rb works in Snow Leopard: http://pastebin.com/f2f76e41e
# by smithjo on 12/23/09 at 18:09:12Thanks for the update in snow leopard ... This only seems to pull the first time, it doesn't grab any of my updates on twitter. Is there something I need to tweak?
# by Ozy on 04/30/10 at 14:12:58Not sure what your problem may be. However, here is the updated copy I am using: http://pastebin.com/mNZ1N8yG. There may be problems if you've overrun your connections per unit time, but in this case, the old status is displayed.
I've also noticed that after you delete a status, the deleted status still shows. This is because Twitter doesn't update the most current status, which the script pulls, after a deletion. Post a New CommentYou must be logged in to post comments. |
# by gerwitz on 01/24/07 at 15:55:07