160160160

toledo 0.0.4.2

April 12th, 2008 in applescript, toledo, cron and itunes

I don't know that this is going to warrant a blog post every time I "update" toledo...but..

I've updated toledo to 0.0.4.2 . It's far from "perfect", but it's rock solid and works completely.

While working, I've actually been using toledo to update my LED sign with my current iTunes track. I put it on the "B" page, then linked pages "A" and "B". In short it alternates between displaying data on the "A" page and the current song on the "B" page.

As I test the software I am writing, I just use the "A" page so the music page continues to alternate through with no issues.

So how, you might ask, am I getting the iTunes track info, exactly?
Glad you asked.

Here is a quick'n'dirty applescript to do exactly what you need.

tunesled.app
tell application "System Events" to set doit to (exists process "iTunes")
tell application "iTunes" to set doit to doit and (player state is playing)
if doit then
tell application "iTunes"
set trk_arts to the artist of the current track
set trk_name to the name of the current track
set trk_albm to the album of the current track
end tell
set trk_desc to quoted form of (trk_arts & " | " & trk_name)
set the_command to "/Path/To/toledo.py --page=\"B\" --speed=\"4\" --line=\"2\" --message=\"" & trk_desc & "\" --output"
end if

Save this as an app, then in terminal, add this to your crontab
*/2 * * * * osascript /Path/To/tunesled.app

And TaDa!

*Special note:
Leopard users, you will see your console fill with Could not setup Mach task special port 9:(os/kern) no access
To fix this, see here

(280 words)

159159159

Holy toledo! Python!

April 11th, 2008 in python, toledo, pyserial, openkomodo, amplus and komodo

When I started the whole "writing an LED sign control software" for my Amplus board, I ran into numerous problems with my attack vector.

PapaJ recommended early on that I look at pySerial , but I passed on it, feeling more comfortable in perl than Python.

Fast forward a few weeks, and I am still frustrated with Perl, so I decide to give Python a whirl. In the span of two days, I re-created virtually all of my previous work without any of the headaches I was experiencing in perl.

Now, don't get me wrong. It's not that perl wasn't suited for the job; there were just too damned many hoops to jump through.

But I'm back on track, and I feel confident that I should reach my "stable" release within a week or so. (Famous last words).

So, go check it out

In other, quasi-related news: I've been a big fan of Eclipse for quite some time, but lately some of the platform issues have really started to bug me. I won't rant and rave, but let's just say: It's slow and updating it is a pain.

Since I've been working on both my Macs and my work Windows machine, I had to install a lot of the ActiveState releases of various languages. On a whim, I decided to give Komodo IDE a whirl. While there is nothing about it that completely blows my doors off, it is a refreshing change from Eclipse.

It's fast, supports a ton of languages OOtB, and doesn't do any funky workspace stuff with projects. I haven't had a chance to really put it through it's paces yet (svn!), but so far I like it.

One catch: It's (arguably) expensive.
Perhaps later this week I will give OpenKomodo a whirl.

(305 words)

158158158

Life is Short

April 4th, 2008 in riki_lindhome, short_film and

Riki Lindhome (yes this one) co-wrote/directed/starred in a short movie called Life is Short

It also stars Samm Levine, Seth MacFarlane and Alexis Bledel.

You can watch it here
Best quote? "She's gonna make stuff come out of me."

(41 words)

157157157

Retain .MKV embedded subtitle tracks using VisualHub

April 3rd, 2008 in visualhub and subtitles

I have a ton of videos that I converting from .MKV to .MP4 for my AppleTV. The problem is, they all have embedded subtitles.

This great little hint was exactly what I needed.

(34 words)

156156156

Technorati Ping for Logahead UNU

April 3rd, 2008 in logahead, code and php

I've meaning to post this for a while.

If you use Logahead UNU (perhaps regular Logahead? Who knows..) you can easily ping Technorati with the addition of a single file (and a quick edit in another).

Copy and paste this file into a new file called "ping.php" in your root Logahead directory.

Next, edit addpost.php with the following information:
(at the top of the file)

include_once("unregister.php");
include_once("lh_functions.php");

include_once("ping.php");

lh_escapes();

(at the bottom)
$id = mysql_insert_id();

ping::technorati("BLOGS TITLE","http://BLOGS-URL.com");

sendtrackback($title,$content,selectpost($id),$track);

That's it! Make sure to edit the BLOGS TITLE and URL to your blog title and address.

ping.php was created by Robert John Kaper. I've made only the slightest change to his script, drop him a line and show him love for this.

(133 words)