Controlling iTunes with Perl
EccentricAnomaly writes "brian d foy has created perl modules for controlling iTunes. His modules, Mac::iTunes and Apache::iTunes, can be found on the CPAN. Now perl mongers can run iTunes remotely via the command line or via a web interface on a Mac hooked-up to a nice stereo to use as a home or office jukebox. I shudder to think what else may be possible now that iTunes is in perl's clutches."
aren't there other players for mac?
or is itunes that good that you would rather use it through web interface than say, mpg123/whatevers the commandline player of the day?
this sounds cool and all, but, like, porting xmms would have been cooler, right?(xmms runs pretty easily on osx, does it(why not if not?)?)
world was created 5 seconds before this post as it is.
The PERL needs AppleScript to talk to iTunes. It doesn't do it on it's own...been there and doing the same thing with PHP :)
Check my gallery site that lets visitors also spy on my currently playing song, etc. I use PHP and MySQL to manage a Mac and Linux (2 box combo) image database. Just for fun, PHP, along w/AppleScript, pulls data from iTunes, while it supports image serving, uploading, resizing, etc. Ho Ho Ho
the subject pretty much covers it completely
Controlling music remotely is only useful when there is a function to turn the volume to 11.
I think what you meant to say was:
using a hack for a hack on a Mac, not a good hack
The PERL needs AppleScript to talk to iTunes. It doesn't do it on it's own...been there and doing the same thing with PHP :)
Yeah, the only problem is you're doing the same, tired "look what I can play" garbage. There has only been one really useful application of iTunes scripting: iSing, and even that is questionable if you survey your surroundings when the song is over. :-)
Because OSX has an entirely non standard Gui (from a Unix perspective) that isn't based on X; I kind of like to use the distinction
For Darwin = Unix CLI or for Darwin/X
For OSX = Aqua interface
Fink for example ports to Darwin not to OSX.
To take your MySQL example, it is not common for Mac applications to have a CLI management system. So a port to OSX IMHO should involve a full Aqua management console. I certainly agree that Fink (et al) have ported it quite well to Darwin.
The original posting should have made this point, as my original reaction was "why use Perl rather than AppleScript"; reading the article, I see there is a good argument in favor of using Perl along with AppleScript, but I imagine I wasn't the first one to go to the page with that thought at the top of my mind.
--unless I'm mistaken, the guys who developed the itunes are the past developers of soundjam, the best, IMO, audio media player for classic mac. They folded and went to work for apple. I still use soundjam for inet radio on my old mac, much better than anything else I have used, including various quicktimes. I've tried them back to back on the same MP3 stream, no comparison.
Don't have a newer mac so don't run osx and don't have an ipod so can't comment on any of those, but if it really IS the soundjam guys I imagine it's a superior product going by their past success.
applescript is just another language to use with OSA, open scripting architecture. You can talk directly to iTunes using apple events.
You might want to try Oroborus they have an Aqua theme. It ain't OSX but if you love Aqua and have to use X... The target audience is more OSX users who need to run some X apps rather than Unix users but still worth a look.
If this is the same code that was discussed over at O'Reilly you need to start tweaking how Apache or other things run.
There was a discussion of this over at MacNN Forums as well.
i wasn't being funny, i was being serious, oh well now i can't even see my own post as i mod funny -5, perl is a hack, itunes is a hack and macs are just bad hacks, osx may be halfway decent as x is such an incredible hack, but the hardware sucks terribly
PERL is not talking to iTunes. AppleScript handles that. All in all, a less than earth shattering event.
I've been waiting for this! It's great, but I hope to see some improvment those modules still have alot of modules! /S
Both links I provided discussed this in depth.
I was curious if the Perl scripts mentioned were simply calling the same Applescripts and how they dealt with these issues. My sense was that they were variations on the similar Perl code discussed at the MacDev page at O'Reilly.
Capiche?
Coming soon to Mac OS X box near you, as part of the already-released Mac::Carbon distribution. I am so gonna have fun with this when it is released
Well, let's see... three out of five of those points apply to Windows, a fourth applied to Windows XP on launch... I guess Windows isn't the standard desktop interface on PCs.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
Brian D. Foy
Brian D. Foy
You know, everytime you write that, he WRITHES IN PAIN.
Brian D. Foy
Brian D. Foy
brian d foY (ha got you that time)