160160160

toledo 0.0.4.2

April 12th, 2008 at 11:33PM in , , and

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

0 Comments. Comments Closed!