Adium
Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All
TwitterIt

TwitterIt

Submitted By Andreas Kröhnke (NinZine)

Description

For short: Syncs your Twitter status and Adium status, both ways

It works like this: Type %_TwitterIt as your custom status message.
What will happen now is that TwitterIt will replace that text with your Twitter status for sure, when it's running.

As it runs, it checks once in a while if you've changed your Twitter status or your Adium status and then syncs them. So it works both ways.

Installation:
Open terminal and type:

sudo gem install rb-appscript htmlentities json
Choose json-1.1.1 (ruby)

This will install the necessary Ruby scripts for TwitterIt to function

Place the TwitterIt directory, which you should extract from the Zip-file, inside preferably:
~/Library/Application Support/Adium 2.0/Scripts/

Edit the lines in the file twitterit.rb, in this directory, to your e-mail and password.

In Adium's preferences, go to Events and add "Run AppleScript" to the Connect event. Then browse to the directory with TwitterIt and choose the file TwitterIt.scpt (this is the AppleScript). Next time you connect in Adium, it should be up and running! :)

Good luck and enjoy!

If you have issues: You can run the script in a Terminal window like this:
ruby ~/Library/Application Support/Adium 2.0/Scripts/TwitterIt/twitterit.rb

Let it run for some minutes (or hours) and then check if there are any error-messages.

Changes

1.4
Fixed known bugs

1.3
Updated for Adium 1.2, no longer works with older versions
    Known bugs
  • Some times can't retrieve all accounts status messages. Changing twitter-status via Adium solves it, or just restart Adium if you have issues.


1.2
Fixed some more issues that came up. Should work as intended now.

1.1
Fixed some bugs

Comments

You can reply to individual comments by clicking the "Reply" link next to each.

# by Ringo on 12/13/07 at 19:09:20

This really doesn't work for me. Followed the instructions and my accounts can't connect.

# by NinZine on 01/07/08 at 23:10:41

Try now with version 1.3, if you still have issues, reply here. I always read comments and aware that it might not be working.

# by DarynAR on 01/06/08 at 14:37:23

ya this doesnt work for me...though i would love it to.

# by NinZine on 01/07/08 at 23:11:21

You could try now with the new version 1.3. Hope this helps!

# by DarynAR on 01/12/08 at 06:19:52

why does my status on adium change to "whatever my status is".It? it's annoying.

# by NinZine on 01/16/08 at 19:43:42

The script never sets a status to that manually, so it must be coming from twitter itself. Though the script is pretty buggy at this state, since Adium decided to change the model on how statuses work :(

Does it happen all the time or just occasionally?

# by DarynAR on 01/16/08 at 05:09:22

so no reason for this?

# by liilliil on 03/12/08 at 22:06:49

Only when I've run the ruby script from my command line all my statuses was updated
All, even those, who was offline - and yes, all them goes online.

# by patmulcahy on 08/03/08 at 01:02:37

Doesn't work for me. Installing the json deal doesn't work:

Successfully installed htmlentities-4.0.0
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install rb-appscript htmlentities json
can't find header files for ruby.

Any idea what to do?

# by robbiet480 on 08/08/08 at 14:53:42

you need to install the dev tools from your mac os x install dvd (maybe cd).

# by jamesflattery on 09/23/08 at 22:45:12

I really hope we can see more development come of this.... I think this could become a very cool plugin.

# by RichardBronosky on 12/01/08 at 17:29:08

A few problems...

I didn't get any status updates so I looked into the Apple Script. It seems to just call the rb, so I decided to do that myself to see the stdout. I got:
[code]
~/Library/Application Support/Adium 2.0/Scripts/TwitterIt$ ruby ./twitterit.rb
Updating.
Status: Blah Blah
Created at: Sun Nov 30 18:45:50 UTC 2008
ERROR: Unknown property, element or command: 'message'
At line: /Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.1/lib/appscript.rb:676:in `method_missing'./twitterit.rb:114:in `status'./twitterit.rb:111:in `each'./twitterit.rb:111:in `status'./twitterit.rb:138
^C./twitterit.rb:169:in `sleep': Interrupt
from ./twitterit.rb:169
[/code]

I poked around at it in rdebug and thought maybe you should change line 114 like so:
[code]
- @status = account.status.message.get
=====
+ @status = account.status_message.get
[/code]

# by jrolland on 07/12/09 at 00:07:16

I made the change in line 114, but now I get a new error message when I try to update via Adium

Not the same
Twitter is newer
ERROR: Unknown property, element or command: 'message'
At line: /Library/Ruby/Gems/1.8/gems/rb-appscript-0.5.2/lib/appscript.rb:677:in `method_missing'./twitterit.rb:101:in `status='./twitterit.rb:98:in `each'./twitterit.rb:98:in `status='./twitterit.rb:145

Here are lines 96-107 in twitterit.rb

def status=(s)
tmp_status = nil
@instance.account.get.each { |account|
if account.enabled.get == true and tmp_status == nil
account.status_message.set(s)
tmp_status = account.message.get
elsif tmp_status != nil
puts "Setting status to: #{tmp_status.message.get}"
account.status.set(tmp_status)
end
}
end

Can anyone (RichardBronosky?) help?

# by jrolland on 07/12/09 at 03:43:22

Found it!

Change line 101 at follows:

[code]
- tmp_status = account.message.get
=====
+ tmp_status = account.status.get
[/code]

(It looks like the line was copy/pasted from line 100 ("account.status_message.set(s)") and the wrong part of the middle was deleted - but that's just a wild-a** guess.

Hope this helps.

Post a New Comment

You must be logged in to post comments.

Install | Download
4.01kb (1479 downloads)

12345
2.70 / 10 votes
Current Version: 1.4
Last Updated: 01/17/08