Twitter Growl Interaction
This on is about how to make twitter updates show up in growl on my Mac.
It would seem that two so increasingly popular things like twitter and growl that both use free apis and have an open infrastructure be easily interconnected – wrong! I had to search quite a while on the net until I came along some ruby program that can be used to interface with growl. The script by Alex Payne is called twitter_monitor.rb and is apparently based on a script by Matt Bidulph called twitter-monitor.rb – notice the difference?
So, first download twitter_monitor.rb and put it in /usr/local/bin or somewhere in your path.
Second, Ruby itself is not a problem as, like with most cool programs and stuff, it comes with Mac OS X 10.4 Tiger (Hey Redmond, redoing stuff is not enough to make a good OS, it needs vision) but to get twitter-growl-interaction working one needs to have rubygems as well. So head over to rubyforge and download, unpack and compile/install gem 0.9.2 in the terminal:
chris$ curl -O http://rubyforge.rubyuser.de/rubygems/rubygems-0.9.2.tgz
[...]
chris$ tar -zxf rubygems-0.9.2.tgz
chris$ cd rubygems-0.9.2
chris$ sudo ruby setup.rb
[...]
After this you can find the gem binary in your /usr/bin folder. If you do not want it to end there but maybe prefer it to be in the /usr/local/bin folder you have to path options to the build process like this:
chris$ sudo ruby setup.rb -prefix=/usr/local
You can pass a lot of options like this to rubygems, but I’d say for a normal use case the defaults are quite OK. Note that you can also decide to only setup rubygems by passing setup, to the setup.rb script.
After installing rubygems, you should update the repository:
chris$ sudo gem update
As you can see, I use sudo to get termporary root privileges which is a cool thing that I always loved about BSD, Unix and Linux. There should be no need to promote a normal user to administrator just so he can use an USB stick, like with some other crippled things that can merely be used to format a floppy. UPS, I’m doing the bashing thing again – back to track.
After you updated your repository like this you want to install twitter. I will post my terminal output so you can see:
chris$ sudo gem install twitter
Install required dependency hpricot? [Yn] y
Select which gem to install for your platform \
(universal-darwin8.0)
1. hpricot 0.5 (ruby)
2. hpricot 0.5 (mswin32)
3. hpricot 0.4 (mswin32)
4. hpricot 0.4 (ruby)
5. Skip this gem
6. Cancel installation
> 1
Building native extensions. This could take a while...
well did not take that long…
Successfully installed twitter-0.0.4
Successfully installed hpricot-0.5
Installing ri documentation for twitter-0.0.4...
Installing ri documentation for hpricot-0.5...
lib/hpricot/elements.rb:366:39: \
'attr' ignored - looks like a variable
lib/hpricot/elements.rb:366:66: 'attr' ignored \
- looks like a variable
Installing RDoc documentation for twitter-0.0.4...
Installing RDoc documentation for hpricot-0.5...
lib/hpricot/elements.rb:366:39: \
'attr' ignored - looks like a variable
lib/hpricot/elements.rb:366:66:
'attr' ignored - looks like a variable
Hm, some messages did not look too promising, like this “attr ignored – looks like a variable” thinggy. First thing I do, in situations like this, is try it a second time:
chris$ sudo gem install twitterPassword:
Successfully installed twitter-0.0.4
Installing ri documentation for twitter-0.0.4...
Installing RDoc documentation for twitter-0.0.4...
Looks better – but who knows. Now edit the file ~/.twitter to include your twitter account information. It should be pretty self explanary, there is a line asking for your email and for your password – by the way you want to make sure the file has 400 rights.
Next, after twitter is setup, install the twitter daemons
chris$ sudo gem install twitter daemons
Successfully installed twitter-0.0.4
Installing ri documentation for twitter-0.0.4...
Installing RDoc documentation for twitter-0.0.4...
Successfully installed daemons-1.0.5
Installing ri documentation for daemons-1.0.5...
While generating documentation for daemons-1.0.5
... MESSAGE: Unhandled special: Special: type=17, text="All"
... RDOC args: --ri --op \
/usr/lib/ruby/gems/1.8/doc/daemons-1.0.5/ri \
--quiet lib README Releases TODO
(continuing with the rest of the installation)
Installing RDoc documentation for daemons-1.0.5...
These messages are not really promising as well, but nevertheless let’s try twitter out:
chris$ twitter friends
Something went wrong!!!
Most likely: The twitter gem requires hpricot version
>= 0.4.59.
Check to make sure that you have at least that version
installed.
To install the newest version of hpricot:
sudo gem install hpricot \
--source http://code.whytheluckystiff.net
Ok, Ok, I do:
chris$ sudo gem install hpricot --source http://code.whytheluckystiff.net
Bulk updating Gem source index for: \
http://code.whytheluckystiff.net
Select which gem to install for your platform \
(universal-darwin8.0)
1. hpricot 0.5.110 (mswin32)
2. hpricot 0.5.110 (ruby)
3. hpricot 0.5.110 (jruby)
4. hpricot 0.5 (ruby)
5. hpricot 0.5 (mswin32)
6. hpricot 0.5 (mswin32)
7. hpricot 0.5 (ruby)
8. Skip this gem
9. Cancel installation
> 2
We already know this part and it ends with the same errors or warnings. Question is, what to do now? Hm, I will have to investigate on this one a tiny bit.
March 22, 2007 at 5:32 pm
I got this working by installing hpricot v0.4.59 and not a version higher.
Still working on getting the Growl stuff to show up though.
November 16, 2007 at 9:50 am
Two new studies show why some people are more attractive for members of the opposite sex than others.
The University of Florida, Florida State University found that physically attractive people almost instantly attract the attention of the interlocutor, sobesednitsy with them, literally, it is difficult to make eye. This conclusion was reached by a series of psychological experiments, which were determined by the people who believe in sending the first seconds after the acquaintance. Here, a curious feature: single, unmarried experimental preferred to look at the guys, beauty opposite sex, and family, people most often by representatives of their sex.
The authors believe that this feature developed a behavior as a result of the evolution: a man trying to find a decent pair to acquire offspring. If this is resolved, he wondered potential rivals. Detailed information about this magazine will be published Journal of Personality and Social Psychology.
In turn, a joint study of the Rockefeller University, Rockefeller University and Duke University, Duke University in North Carolina revealed that women are perceived differently by men smell. During experiments studied the perception of women one of the ingredients of male pheromone-androstenona smell, which is contained in urine or sweat.
The results were startling: women are part of this repugnant odor, and the other part is very attractive, resembling the smell of vanilla, and the third group have not felt any smell. The authors argue that the reason is that the differences in the receptor responsible for the olfactory system, from different people are different.
It has long been proven that mammals (including human) odor is one way of attracting the attention of representatives of the opposite sex. A detailed article about the journal Nature will publish.
November 14, 2008 at 9:08 pm
Here’s a simple Perl version http://www.echo-technology.co.uk/2008/11/11/how-to-growl-and-twitter/
September 10, 2009 at 2:01 pm
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.
September 11, 2009 at 3:47 pm
Sign: umsun Hello!!! rcuwwymhyw and 5652ssgfhphzye and 6441Nice blog!