Chapter Tool GUI Part II

I had planned to create a GUI wrapper, perhaps in AppleScript Studio, for Apple’s Chapter Tool command line program. My application was going to have an interface very similar to QuickTime Player, but with an extra section where you entered data about the chapter(s). You would be able to scrub through the track, and find the place to insert the Chapter Marker: then you would have a list of Chapter Markers, and the ability to edit the location, and the attributes. I did a bit of stuff with Python’s XML handling features, enough to basically figure out how to write out the required XML basic structure, and I think I know how to do the attributes. What I cannot do is figure out how to get a QT viewer in the AppleScript Studio progam (or Interface Builder, actually). There seems to be some templates for PyObj-C applications, I may use one of those. Or, I might just make an application that controls/gets data from QuickTime Player (iTunes isn’t so good for this, as it requires files to be imported before playing them). Then, all it needs to do is look after the XML generation, and bingo, easy Chapters. Actually, I remember why I stopped: Chapter Tool would not work on my Mac.

Meow!

Using the program Meow, it’s possible to see what notifications different programs give to the system - things like changing the menu-bar, that the menu was activated, and in iTunes, that the song has changed. Yes, you heard right - there will be no need to poll the system every n seconds to see if the song is the same! Or if the song is paused! Now I just need to find out how to discover these notifications, and act upon them.

Simpler iTunes Library Checker

I posted some code exactly a month ago, then I find this. I will rewrite the code so it is simpler, using the MacOS hooks that come with PyObjC.

Smarty: Insert / Comment Tags

Smarty This may have some use: {insert}. I noticed it when backing up my templates tonight… • Also, I’d like to make buttons that act like the quicktags in the Blogsome backend for commenting: so it inserts the relevant tags in. Will require some JavaScript, I assume…

Play next in Party Shuffle.

Note to self: write a contextual menu item that plays the selected song next in party shuffle, after (if necessary) importing the song into iTunes.

Cross Compilation NSLU2/MacOSX

So, I’ve built the toolchain - it’s about 69Mb raw, which zips to about 26Mb. Tarring and BZip2ing it reduces it to 18Mb. What I want to know is: is it only the stuff in bin/ that is used when cross-compiling? If so, this compresses to around 3.6Mb, which is small enough to post for others to use… Also, it’s possible to just copy the armv5b-softfloat-linux-* files (I used ln, so they are still in the original spot, but take up no extra room) to a place in your path. From what I’ve just read, the only thing really used is the compiler, but surely the linker is too. I have built a hello.c program, but cannot test it until I get my NSLU2.

NSLU2 MacOSX Toolchain

I’ve just paid for (and expect to receive in the next couple of days) a large (160Gb) USB Hard Drive, and in the next week or so I’ll also buy a Linksys NSLU2 NAS device, to share the HDD with all devices in my network. One of the reasons I decided on this route is the extreme hackability of the NSLU2 - it comes with a cut-down version of Linux with only SMB sharing turned on, but by flashing a new ROM it’s possible to set it up as a complete server. I aim to use it for mainly sharing files, but just for fun I’ll try and build python for it. I had a whole lot of experience building python for BeOS/PPC a few years back. It started to run into problems when building sockets and anything that used mmap(), and after about 2.2 I’m not sure I ever got it to work correctly again. Building the cross compilation toolchain to allow me to do this from MacOS X is quite complicated: you have to download about 60Mb of source code, and then build it. More details on this page. My notes on the topic follow: Make sure you reference the nslu2/bin directory in your path before the other location where the tools you installed are. Bash looks in the order they appear in the environment library list, so if expr is in two places, the first one it is found in is used, for example. The good news is, if the files have been downloaded, and the build fails, it is smart enough not to try and re-download them. Make sure you follow the instructions carefully - I did a make install instead of the cp src/expr $HOME/local/nslu2, and it failed dismally.

Mass Mailout

I ended up using a program called Serial Mail for the first mailout I did. I’m really hoping it works, as there isn’t really a way to tell if it has or not. It’s currently sending them as I type this. I really think I’ll end up rolling my own - there’s some limitations as to the system I used (a typo/bug means I can’t get people’s birthdays!), and I really think I can do better. I think I’ll write my own templating interface, rather than use a Draft (although, this is a good idea). And it just uses AppleScript calls to do all of the generation - I think I may try to hook straight into the APIs. Which reminds me - I came across someone who mentioned it’s possible to make ‘proper’ custom fields in the Address Book Database - which wouldn’t be accessible through the standard application, but would allow greater flexibility. Like to define a field as only being able to have a particular value, such as a Coaching or Referee Level, or Gender. A custom program that can work with custom fields, and do mass-mailings. Something to do in the next holidays. I wonder how long this thing is going to take to send all of those 146 emails?

Coding on Palm

I don’t write too many blog entries on my Zire (thanks to Jason, I’m not game to call it my Palm), and I just remembered why. It takes ages to enter data, and the error rate is too high. I was just trying to write a program in python (to run at home - I need to reinstall it on my Zire) and writing commas in particular is quite difficult. I might get around to buying a keyboard, or maybe just a laptop! I kind of like graffiti, but I wonder what the Palms with a keyboard are like. Using a retractable pen with the tip up is more comfy than the stylus.

Phase One of iTunes Chat Client

I’ve started phase one of the iTunes controller bot: I’m downloading the jabber server for MacOS X. ` $ sudo port install jabberd ` Phase Two will soon be underway: I’ve also downloaded the source of a Python bot… more to come soon! Actually, getting the jabber server to work wasn’t as easy as it should have been: I’m using a private jabber account on a server only I know about, but I’ll post more stuff as I get it working. Python looks to be an easy way of getting the bot to work: it would be nice to be able to do it all in AppleScript though. I can’t believe I just said that!