So…here’s the deal. I’ve never looked at Ruby before last week. I do
web development work in C#, PHP, and Coldfusion as a living, but I’m
used to languages that look like C. Ruby looks more like TSQL functions
mixed with python, minus the tabs. Anyhow, I ran across a script in Ruby
that was exactly what I was looking for, applicable to my
cross-nerd-cultural project of running linux with Beryl with engine
management/tuning software (enginuity), GPS (roadnav…sucks), 80 GB of
music on tap (Banshee…not so bad), and I wanted to add video recording
via a webcam to the mix for race days, defending myself in court, etc.
This is running on an in-dash carputer in a hopped up Subaru STi.
I found this link:
after spending too much time trying to figure a good bash script for
slaving VLC for recording duties. The only problem is that it uses TK,
which is butt ugly. So I tried to adapt it to use GTK for the GUI, and
after 45 minutes of tinkering (with help from the gnome-ruby sourceforge
page), it worked. Except for the counter. And I spent 5 hours trying to
get the counter to work. And I can’t find a Ruby tutorial that either
doesn’t condescend to me and never gets to it, or expects I have a
more-than-basic understanding of %, #, and ALL CAPS.
Attached are the original script file from the link, as well as the
modified version I did to use GTK widgets, with the counter calls and
thread commented out (lines 84 to 90 and 98).
Any help you can give would be great. And that includes an accelerated
but thorough how-to site for Ruby, as all I found thus far either never
got so far as explaining what a pound sign was doing in the middle of a
statement while still being evaluated (only for definitions from my
land), or took that for common knowledge. None in between.
BTW, you’ll need Linux, VLC, and a webcam to run that script
successfully, as well as ruby-gtk2. Thanks,