this is kind of music related
Aug. 9th, 2009 07:55 pmPeople have wanted some sort of ON AIR sign for when I'm recording here at murknorth for a while, but I haven't wanted to drill holes in walls and run wires and all that kind of crap, because I'm done with that. So I ended up writing something in CSS/HTML and Perl. It's mostly automated, which was the goal (because really you shouldn't have a separate switch for ON AIR, it should come with the mixer), it knows whether system power is on, it knows what OS the computer is booted into, it knows (...distantly...) whether Audacity is running, and reflects that in a reasonably simple set of status displays, with ON AIR being HUGE FONT ON RED. The only thing it can't know is whether you're editing or actually recording, so there are commands for that part. (I'd like to make that less stupid later via some sort of web interface, but it's the best solution for right now.)
Oh, and the client side works as a pseudo-iPhone application - not a real one, I stress, but you can treat it like one and nobody will know the difference. Also, if you load the client side in Safari, you can convert it to a Dashboard app using the Safari dashboard converter tool. Not that there's any good reason to do any of this.
All in all it's two daemons running on two separate machines that talk to each other, a little set of client commands, and a set of web pages that get rotated in and out. I wrote about 200 lines combined in Perl, and about 100 lines in HTML, the latter being substantially taken from an example-code site. (There's actually 437 lines of HTML and CSS, but the rest is copy-and-paste-with-tiny-edits bullshittery in ways that make the Perl code shorter.) It's not good code, really - I mean, it's Perl - but apparently I can still churn out a bit of hax for a sufficientlydumb good reason.
Oh, and the client side works as a pseudo-iPhone application - not a real one, I stress, but you can treat it like one and nobody will know the difference. Also, if you load the client side in Safari, you can convert it to a Dashboard app using the Safari dashboard converter tool. Not that there's any good reason to do any of this.
All in all it's two daemons running on two separate machines that talk to each other, a little set of client commands, and a set of web pages that get rotated in and out. I wrote about 200 lines combined in Perl, and about 100 lines in HTML, the latter being substantially taken from an example-code site. (There's actually 437 lines of HTML and CSS, but the rest is copy-and-paste-with-tiny-edits bullshittery in ways that make the Perl code shorter.) It's not good code, really - I mean, it's Perl - but apparently I can still churn out a bit of hax for a sufficiently
no subject
Date: 2009-08-10 04:10 am (UTC)seeing as how there is not a web-enabled teapot there.....
Date: 2009-08-10 04:22 am (UTC)no subject
Date: 2009-08-10 02:59 pm (UTC)