Address Book vCard Publishing with AppleScript and SCP

The one piece of my .Mac replacement I’ve been missing is a way to publish our address book to the web. Every different web mail app has its own address book, and none of them sync with each other, with Outlook or, for me, Address Book.app — rendering all of them useless. So I needed my own way to, in a pinch, get addresses online. vCard PHP provides the parser and renderer, but I, obviously, needed to provide the group vCard for it to show me. Enter AppleScript again.
The goal of this script was to invoke Address Book.app’s Export command on all of the contacts in its database. I found a script online that exported individual vCards, so with a little modification I was able to get it to dump out a single group vCard. The next challenge was getting it up to my webserver.
I’m learning UNIX as well as AppleScript, so I was quite happy to put SCP to work. However, I hit a brick wall when trying to get AppleScript to pass in my server password. It can’t do it. I searched all over the Internets, but apparently once AppleScript invokes SCP, it loses control. And SCP obviously doesn’t have an AppleScript dictionary of commands. This behaviour is quite different from SSH, with which you do not lose control.
This sucked for a long time, until I finally broke down and decided to learn about RSA key pairs for authentication. I’ve been avoiding this for quite awhile now, because I frankly like just using a password, and I was scared of learning such an obscure new topic. But I finally figured it out — although that’s a topic for another post…
Anyway, assuming you have key pairs set up with your server, this script will do the trick. As I mentioned, it exports your Address Book to a group vCard in a given folder on your local hard machine, then SCPs the file up to a given folder on your web server. Point vCard PHP to that file, and schedule the AppleScript to run at a specific time using iCal, and you have an updated Address Book online!
Download the Script Here

The only thing cooler than an iPhone…

…Is a hacked iPhone!
So, as promised, I ran the AppTap installer last night and unshackled my iPhone. The whole process was dead simple — so simple, in fact, that I think Apple might secretly not mind at all that its going on. It might be part of their strategy to let third parties experiment, without having to be responsible for the quality of those apps.
13052_large.jpgThey needn’t worry too much, though. Most of the apps I found were excellent. Once you run AppTap, you get a new little icon on your home screen called Installer. From there you can download the community services package, and open up a world of new toys and gadgets for your phone.
SummerBoard adds much needed enhancements to the home screen, allowing you to set a backdrop picture, change the theme and scroll through more than one page of apps (you’ll need to do this once you see what’s out there). The installer offers pages and pages of programs — everything from a VNC client and the Apache web server, to an NES emulator that actually works really well. There’s also a Chat client (AIM only, unfortunately), a voice recorder, and a DDR clone called Tap Tap Revolution, that manages to capture most of the frantic action that is DDR.
I’m completely happy with my hack, and totally OK with waiting until the community adapts to the upcoming 1.1.1 firmware before I upgrade. The only thing I’m not happy about is a stupid mistake I made while copying NES ROMs over my network to be loaded onto the iPhone. I tossed them in my videos directory — needing just a temporary share to transfer them with — and then deleted them when I was done… Only I accidentally deleted some of the video folders at the same time. Lost about 120GB worth of TV shows, 100GB worth of our movie collection, and our home movies…
I immediately ran Data Rescue II, but it wasn’t able to recover a single file. Fortunately, my friend Jon Bates had just mirrored my movie collection, and most of the home movies are on DVD somewhere. The TV shows are all gone, but if it had to happen, the timing couldn’t be better. This summer we managed to watch all of Stargate SG-1 (yes, all 10 seasons), all of X-Files (except season 9, which I had started, but am not disappointed at all about losing) and all of Lost season 3. And new TV starts next week, so the hard drive will quickly fill back up with newly recorded shows. And anything we really miss… there’s always the torrents.
In conclusion, I am retarded, and my iPhone is not.

It's Time

jailbreak1.pngI’ve had my iPhone for almost 3 months now, and I haven’t once tried to unlock, hack it, or install 3rd party applications on it. I’ve been patiently waiting for Apple to come out with their long-promised software update that would give me the missing features i want… Meanwhile I’ve been watching the community’s efforts, and their output is finally where it needs to be.
Check out this video (ignore the somewhat creepy iBrate part) to see how simple it is to download and install hundreds of applications on the iPhone. My patience has run thin, and I’ll be doing this when I get home tonite… Looking forward to playing Super Mario on my phone!

Apples Everywhere

We went apple picking this weekend with Jon and Virginia and Jason, Brooke and Alivia. It was a beautiful afternoon, and Benjamin slept like a rock when we got home. We now have plenty of apples, apple crumble and apple cider to get through…
The Flickr feed is updated, and includes some glamor shots of the other kind of Apples I like…

Going to Florida…maybe…

I discovered long ago that I’m a naturally lazy person. If I stop for awhile, I have a hard time making myself go again. However, as long as I stay in the groove, rest doesn’t enter my mind. So, as a survival skill in college, I learned not to slow down. As long as every waking hour was full of something, I’d never have time to be lazy.
The strategy worked, and its been 10 years since I’ve taken a break. My rhythm has been non-stop. The reason we fill practically every night of every week is so that we’ll never consider what it might be like to pause. An 80-hour week has been the norm for me, and I’ve gotten so good at it, that the idea of a vacation is honestly a little bit repulsive. A friend told me recently they were thinking of a vacation, and I chided them for considering something so selfish.
However, I’m starting to concede that I might be wrong on this point. We had a series at church where our pastor talked about God’s rhythm: 6 days of hard work, and 1 day of rest. I haven’t known a day of rest in years, and I haven’t had the desire to take one. But like I said, I might have been wrong here.
I remember, literally the day before Benjamin was born, working at the church with Nicole and her busting gut right beside me. And I remember thinking anyone who did any less was dead wrong.
Well God put on the brakes in our life recently, and its certainly made me re-think a lot of things… well, almost everything actually. But one thing I’ve been toying with is this idea of rest. We had most of my vacation time booked in August for a missions trip that we didn’t end up going on, and now its half-way through September, and I have a bunch of free days that we don’t know what to do with. So we think we might try out an actual vacation.
There was a time when the idea of just sitting on a beach and doing nothing would have driven me crazy. This is not self-righteousness talking, in case it sounds that way. Its pure curiosity. I’ve always been afraid that if I tried it, I might not get back up off the beach, or that I’d miss something back home that I should have been doing. But all of a sudden, the really important stuff isn’t in my hands — probably it never was — and we honestly don’t have much else to do but try this out.
It doesn’t fit our financial goals. It doesn’t make any logical sense. It won’t help my career. It won’t benefit anyone else. And we might just enjoy doing it too much. But we’re going to try it out anyway — assuming we can pull the money together while planning for a second baby, figuring out where we’re going to live with our growing family, budgeting for the future, and negotiating our growing Canadian expenses (thanks to the US$).
So, at the end of October, we’re going to Florida — just the two of us (that is, if we can find a babysitter!) Wish us luck, or even better, help us out 😉