June 2004


Well, my four week stint of wearing a pedometer is over. I must say, I really enjoyed it, and it shows me I am not only quite active during the week, but pretty damn inactive over the weekends - unless I have Touch on. And even then, coaching means I walk a hell of a lot less than playing.

But I guess I don’t really need a pedometer to tell me that!

My highest step count was 20,022 steps: this was on a Thursday (when I play Touch) - I ran out of money and bus ticket, and had to walk home!

My lowest step count was 1,415 steps - the Sunday after a 21st. You figure out why.

My average over the whole month was 11,709 steps per day - more than the target of 10,000. My weekday average was 13,662; on the weekends (including public holidays) I averaged 7500.

Over the whole time period, I did about 328,000 steps: the equivalent of walking to Kingston, S.E. Shame I didn’t make it to Robe.


Click on the image above to see a breakdown of my daily step counts.

View Comments (0)   RSS Feed for Comments on this Post

I finally got around to downloading the 10.3.4 OS X update, SharePoints, and Xbox Media Centre (XBMC). My aim for some time has been to share my iTunes library to my Xbox, which is connected up to the TV and Stereo in the lounge.

The MacOS X update provided (apparently) updated Samba sharing, but I still couldn’t get XMP (Xbox Media Player - the previous incarnation of XBMC) to connect to the SMB share I had set up, with all of my MP3s on it. SharePoints fixed that - all I had to do was create a publicly available share.

Setting up XBMC was a breeze, and it even has a cool interface! UnleashX is (almost) banished from my system, and XBMC is my main Dash.

Then I discovered that XCMC can play AAC files! So, I started (and have not yet finished) converting all of my MP3s to AAC. And not just converting, but re-importing, at a bitrate of 128 (small file size, but apparently equivalent to 256 in MP3). See this hint for some tips (and my comments).

I also wanted to re-jig how I had set up sharing my iTunes songs between users - I had a couple of links to the relevant files in each user’s ~/Music/iTunes, and all files were located in ~shared/Music (which all of admin can RW, and all of the world can R). I needed to have seperate Library files, so that we can have our own ratings (I hate Abba, and she isn’t that big a fan of Paul Kelly, for instance). So, I knocked up a script that scanned the ~shared/Music folder and compared any files found to the iTunes LIbrary. If they weren’t in it, it added them.

Here we go:
set _tracks to “”
tell application “iTunes”
    set sel to tracks of playlist 1
    –set sel to get a reference to selection
    repeat with t in sel
        set _tracks to _tracks & “
” & (location of t as string)
    end repeat
end tell

tell application “Finder”
    set _files to “”
    set _library to “Macintosh HD:Users:Shared:Music”
    set _artists to folders of folder _library
    repeat with _artist in _artists
        set _albums to folders of _artist
        repeat with _album in _albums
            set temp to files of _album
            repeat with _file in temp
                set _files to _files & “
” & _file
            end repeat
        end repeat
    end repeat
end tell
set _missing to “”
repeat with para in paragraphs of _files
    set para to para as string
    if para is not in _tracks then
        set _missing to _missing & “
” & para
    end if
end repeat

tell application “iTunes”
    repeat with para in paragraphs of _missing
        set para to para as string
        if para is not “” then
            set _file to para
            add _file
        end if
    end repeat
end tell

Which worked, but was a bit slow. So I came up with the following system instead:

Create a file called ~/.last_check

Enter the following into a script, and then run it. (I’ve had to modify some lines to get it to look good - particularly the fp=os.popen… line).

#! /usr/bin/env python
# Check for songs newer than ~/.last_check, and add them to iTunes

import os
import sys

fp = os.popen(
"find ~shared/Music -name *.m?? -newer ~/.last_check")

data = fp.readlines()

if len(data) == 0:
    print "No New Songs."
    sys.exit(0)

for line in data:
    filename = "Macintosh HD"+line[:-1]
    filename = filename.replace(”/”,”:”)
    print “Adding”, filename
    os.system(”’osascript < 

Should be pretty quick - I only tested it with a few files, but seems to work okay. iTunes is even smart enough to not re-add files that are already there (I think!), so it won’t add duplicates!

My library lives in ~shared/Music, yours may vary!

You will, however, need to use something like Super Remove Dead Tracks if you update one library with a new encoder!
I accept no responsibility if it screws up your iTunes Library file!

View Comments (0)   RSS Feed for Comments on this Post

Just for fun (actually, to see if Google I plugged in “Life According To Matt” (notice the quotes). I was happy to say that this blog came top of the results list, but I was amused to see the remainder:

  • Authorized Version Defense Mystery Of The Cursed Fig Tree
  • The Florida Catholic - Abortion Destroys Women’s Health
  • Claude “Fiddler” Williams: Nearly as Young as Jazz
  • Unknown News - www.UnknownNews.net - The news you need, whether …
  • [PDF] BT V3N16 File Format: PDF/Adobe Acrobat
  • 2blowhards.com: Half Baked Notions, Redux
  • The Vertex - 6.0

From then on in, everything is bible related.

Without the quotes, I come in number 3. Like anyone cares.

View Comments (0)   RSS Feed for Comments on this Post

iTunes stores most of the meta-data about songs as id3 tags when you have MP3 files in your collection. I’m not sure what it does with AAC - probably they can have id3 tags or similar as well. However, some important bits of data are not stored - the play count, the rating and the added/played dates.

Rating Writer (written by Cornelius Qualley) fixes some of this, but I thought I would expand it so that it stores the other bits. And so that it is smart about not overwriting comments. Enter iTunes MetaData BackUp.scpt. Once again I am reminded of how crap AppleScript is if you are not just doing something really basic. Python so rocks.

Finally, though, I managed to get everything working, with one exception: you do not seem to be able to convert back into a date from a string, unless you just typed it in as code. I’ve tried, several times, including stripping out trailing newlines, and then finally by creating a function/subroutine to do it manually. But guess what. None of them actually work. iTunes will not accept any type of date back in.

So, it only backs up and restores the rating and the played count.

Hardly three hours work, in the end.

Swears under breath.

View Comments (0)   RSS Feed for Comments on this Post

Ain’t technology wonderful. Listening to iTunes tonight, I noticed that the song Darling Nikki has a little bit at the end that is backwards. Grabbing this and reversing it in Sound Studio (but it wouldn’t play in SS, had to re-save it and load it in QuickTime Player), it gives the following:

Hello. How are you?
I’m fine, ’cause I know the Lord is coming soon.
Coming, coming soon.
Ha Ha Ha Ha Ha….

Reminded me of the segment that John Safran had on Music Jamboree a few years back. Way back in 2002, according to the website.

View Comments (0)   RSS Feed for Comments on this Post

Because I have a PC right next to my Mac (I hate Windows, but until AutoDesk make Inventor for MacOS X…) I sometimes need to be able to check my diary - which I have recently converted to iCal. Since the reason I am not on the Mac is because my Significant Other is using it, I need a non-gui, non-AppleScript way of checking what’s on for me today.

Being a refugee from BeOS, and having used various unix (and even VMS - the DOS of the mainframe world!) flavours, I had come across calendar. What I needed was a way to make calendar read from the iCal *.ics files. (Speaking of ICS, Google seems to think I am searching for Internet Connection Sharing. Grr!) Since the files themselves are quite easy to understand, I knocked up a quick python script.

Called pycal.py, you can find it at pycal.py.

View Comments (0)   RSS Feed for Comments on this Post

I’ve been playing around with iCal recently - I’t a great program. I’ve used it to organise everything, including replacing a custom Access Database I’d setup to create a training diary for one of the Touch teams I coach. Now, since my iMac isn’t always connected to the Internet, I created an account with icalx.com so I can access my calendars from home. This site uses the fine program PHPCalendar to parse and represent html versions of your iCal .ics files. And the best thing for me was that I can use iCal’s publish feature to set it up.

It was also possible to use PHP calendar to publish on my iMac’s intranet site, but I couldn’t publish to both. So, being a little BeOS refugee, I set up some links to the files, rather than the scheduled script to copy the files across. Sym-links wouldn’t work (webserver cannot access files that live outside the Sites directory), so I used hard-links. All well and good.

Except iCal doesn’t save files, it saves files to a new filename, and then deletes the original file and renames the new copy. So hard-links don’t work. This seems to be the reason why you can ’share’ an iTunes library between users on the same machine using sym-links (or even aliases) but not with hard-links.

I guess it’s back to scheduled copies - or maybe I can get Folder Action scripts to work…

View Comments (0)   RSS Feed for Comments on this Post

I spent a few hours last night playing around with scripting Mail.app - what I really want to be able to do is read my email from a shell interface (like pine, or something), but still use the emails I’ve stored in my Mail.app mailboxes.

Option 1: Use pine.
(more…)

View Comments (0)   RSS Feed for Comments on this Post