What I’ve Been Working On

If you’ve been following me on Twitter, then you know all I’ve talked about lately is the work I’ve been doing. Working from home as I do and doing zero self promotion as I do, the work tends to come and go in waves. Lately it’s been a bit of tsunami and I am completely not complaining. I wanted to stop briefly though and show off some of my recently completed graphic design work.

Working for friends is awesome!
My friend Geof just bought a professional grade camera. To help him justify spending the huge wad of cash we convinced him that he needed to go into business for himself as a concert photographer. Since he’s been doing it for several years now anyway, it didn’t take a lot of arm twisting. I knew I wanted to use one of his photographs to highlight what he does. To let the photo really shine, I thought the logo needed to be fairly simple. I made a couple of logo options and showed them to him but this one was my favorite and it’s the one I put on the card as a mock up. He was fairly blown away by it and wanted to order the business cards immediately.

Another awesome friend!
Liza recently started her own business and asked me to work on her logo and then set up some business cards. It’s such an honor to have friends think I do nice enough work that they want to use my stuff for their businesses. I just never get tired of that particular rush. Since she has a consulting company, we needed the logo to be formal. Since she does ebook software publishing, we wanted to invoke the feel of a book without the specific icon of a book. She liked the three vertical bars as they suggested books on a shelf. Originally, I wanted to use a green for the logo since ebooks are so environmentally friendly. I picked several greens and neither Liza or I liked any of them. On a whim, I choose a few blues as well. She and I both keyed on this blue and we ran with it. The vertical business card is something I always like to do as an option for a client. Very few of them ever choose the vertical. I’m proud that she did in this case because it again plays with that idea of the book standing on a shelf.

Huntsville Library Foundation Outside
Huntsville Library Foundation Inside
Amy got me hooked up with the Library Foundation and this and several other projects in progress are the bulk of what I’ve been working on lately. This is the Foundation’s end of the year mailer. It’s a bit of an annual report and preview of things to come in the new year for the library system in Madison county. Working for my local library is especially fun because I’ve worked off and on in libraries my whole life. I’m pleased with the way this piece turned out because it showcases some of the library staff and their many years of service. Bonus: Amy took all the photos.

I actually have a couple of other finished projects that I’m not showing in this post because the event hasn’t happened yet. As soon as it does, I’ll be posting it here for you to see and me to remember.

Some of My Best Friends Use Facebook

From the Washington Post’s coverage of yesterday’s Republican National Committee chairman debate:

“We have to do it in the Facebook, with the Twittering, the different technology that young people are using today,” Duncan ventured.

“Let me just say that I have 4,000 friends on Facebook,” contributed Blackwell, putting his hand on Dawson’s and Anuzis’s knees. “That’s probably more than these two guys put together, but who’s counting, you know?” Acknowledged Saltsman: “I’m not sure all of us combined Twitter as much as Saul.”

Anuzis claimed he had “somewhere between 2- and 3,000” Facebook friends, which prompted Blackwell to remind the audience that he has 4,000 friends on the social networking site by waving four fingers behind Anuzis’s head.

While doing it in the Facebook and with the Twittering may become this year’s series of tubes, current RNC chair Mike Duncan sounding like someone’s out-of-touch grandmother isn’t the underlying issue. What is key is the candidates’ view of technology as magic pixie dust that, when scattered over their political aspirations, will give rise to unicorns that reliably vote Republican.

It’s not the technology that counts. This isn’t buzzword bingo, where every mention of a social networking site gets you closer to winning. It’s what you do with the tech. These guys expecting a couple of 140-word messages to make a huge difference is like the CEO requesting that someone in the company make one of those web logs which he’s heard so much about.

Obama’s campaign make remarkable use of social applications and networking. Campaign staffers created an iPhone app that would sort a user’s contacts by location, with those in swing states at the top, and then encourage the user to call those people. Obama announced his VP choice via text message, allowing him to amass a huge database of cell phone numbers. The Obama campaign used technology to collect information, identify people to campaign to, and enlist people to help them with that campaigning.

If I were quizzing the RNC chairman candidates on technology, I’d be asking them what they wanted to do with that technology, not if they’ve ever Plurked.

Fortunately, there were questions the candidates were much more comfortable answering.

When moderator Grover Norquist asked how many firearms the candidates own, the current RNC chairman, Mike Duncan, who despite presiding over his party’s 2008 electoral trouncing is reapplying for his job, noted proudly that he claims four handguns and two rifles.

Rival Katon Dawson, chairman of the South Carolina GOP, said that he has “too many to count.”

Former OH Secretary of State Ken Blackwell was willing to count. Seven, he said, adding: “And I’m good.”

MI GOP chairman Saul Anuzis said he has two guns, but in case the RNC’s 168 committee members, who will vote this month for the next party chairman, wanted to verify his stash, Anuzis said, perhaps only half jokingly, that he is not allowed to carry them in Washington.

“Besides, I even have the word ‘uzi’ in my name,” Anuzis added, pointing at his nametag. “See? Right there.”

Grandpa Joe

The past six weeks have slid by in a blur of work and travel and gray days. Winter arrived with too many cloudy days to count and it has oppressed me more than I can remember since my Emo high school days. I have sat down to write about the passing of my grandpa half a dozen times and instead of getting easier, I find it harder and harder to call up the memories and then the words to express them. He died at the beginning of December and while I am glad he is free from his suffering, the days since then have all been tinged with a melancholy that I never expected to feel. Each day I get up and think that if the sun will only shine I will start to feel better, and each night I go to bed feeling as if I have spent the day swimming too slowly through my life. And so I have come to understand that this is grief.

My earliest memory of my Grandpa Joe is talking to him on the police radio. He was a county sheriff in southern Missouri for eight years. The radio in his bedroom was how I let him know that I’d made it to his house after our three hour drive from Arkansas. The last half hour of the drive, all I could talk about was calling him on the radio. I was so excited to hear his voice come over the radio and know that he was coming home to see me. I’m sure all the police personnel hated hearing a squeaky-voiced girl on the radio, but there was never any denying the pleasure in my grandpa’s voice.

Another early memory of my grandpa was giving him my dog. My dad bought me a bloodhound puppy. That puppy grew to be a giant dog that I was afraid of, so I gladly gave the dog and his excellent name, Mr. Magoo, to my grandpa. After all, what better company for a sheriff than a bloodhound? After Grandpa trained Mr. Magoo for a while, he had my dad and uncle take me way out into the woods on their farm. He gave the dog my favorite stuffed animal and the dog found me in record time. He was so proud of that dog and what he could do.

He only spoke to me once about his time in the Marines. I had a class project in junior high and we were supposed to interview an elderly person–specifically, someone who had contributed to society in some way. I asked him about his time in the service in World War II and he spoke briefly about landing in Hiroshima after the end of the war. It was hard for him to talk about, and he didn’t want to tell me about what he saw or even remember what he witnessed, I think. This past summer while we walked around the rebuilt city, my thoughts often turned to him having walked the same ground after the bomb. It was an emotional day, one that in retrospect was made more so by his only question about our travels in Japan:  “Did you visit Hiroshima?” An odd connection, but one that I feel very strongly anyway.

I have so many memories of roaming the hills and valleys of his farm. Fishing in the pond. Hiding in his shop. Playing in the mud of the newly built lake when they moved to Arkansas. “Helping” with the cows. Watching him build things. Treasuring the things he built for me over the years. Visiting their house during my Sunday afternoons off from Governor’s school and doing my laundry. His pride in my graduating college. Seeing him care for my ailing grandmother. Watching him enjoy my children.

Grandpa Joe, Kate (my mom), and a very young Liza

I remember his constant presence in my life, with me always knowing of his love and support, and how he treated so many people that same way. When I was younger, I thought everyone had a grandfather like that. I know now as an adult how lucky and loved I was. I already miss him so much.

Chester Faye “Joe” Hawkins
May 13, 1922-December 9, 2008

Christmas Photos

My favorite of the Christmas photos this year. Stephen took it during an extended Lego building session.

IMG_4840.JPG

Click on the photo for more Christmas pictures.

Liza Versus the Milkshake

While we were back in Arkansas, we had lunch at The Purple Cow, a burger-and-shake restaurant in Little Rock that Misty loved when she lived there. Because we are Americans who love our calories like we love our guns and unregulated financial systems, we ordered two milkshakes, one for me and Misty, and the other for Eli and Liza.

Eli took one sip and said, “That’s enough for me.” Liza, on the other hand….

Liza hugging her milkshake while she slurps it down.

Notice how she has her hands wrapped around the glass, making sure that it doesn’t go anywhere. A few times we would take it away so that she’d remember to breathe, and immediately she would point at the glass and fervently make the sign for “more”.

Of course, that’s a lot of milk for such a small kid, and eventually she became milk-drunk. She was so tired, she laid her head to one side. That didn’t mean she stopped drinking, though.

Liza, tired yet still drinking on her milkshake

If milkshakes came in brown paper bags, she’d be ready for the street.

Converting iTunes Playlists to M3U Playlists on a Mac

So I wasn’t content with just one way of creating M3U playlists out of iTunes. I went and wrote another. There’s more than one way to do it, as I learned writing Perl programs.

Pity I’m writing in Python.

Anyway, this method only works on a Mac, because it uses Applescript. Actually, it uses appscript, an event bridge that lets you do what Applescript does, only in a real language like Python. It’s called iTunesm3u.py, and requires that you install py-appscript first. To use it, have iTunes open. Select a playlist. Then run the script (or double-click the script if you turn it into an app with py2app) and it’ll create an .m3u file in the same directory as the script.


#!/usr/bin/env python

# Using the appscript Python-to-applescript bridge, convert an iTunes
# playlist into m3u format.
#
# Author: Stephen Granade
# Date: 2 January 2009

import math, re, sys, os
from appscript import *

# Search-and-replace strings to adjust the mp3's locations if necessary.
sandrStrs = { "/Volumes": "smb://sargent" }

# For more information about what classes etc. are available from iTunes
# via appscript, see
# http://appscript.sourceforge.net/objc-appscript/iTunes-objc/index.html

# Get ahold of iTunes
iTunes = app('iTunes')

# The browser window's view is the currently-selected playlist
try:
    playlist=iTunes.browser_windows[1].view()
except CommandError, detail:
    if detail.errornumber == -1731:
        print "There is no current playlist."
        sys.stdout.write('\a')
        sys.stdout.flush()
        sys.exit()
    else:
        raise CommandError, detail

# Use the playlist's name as that of the m3u file
outfn = os.path.abspath(__file__)
outfn = os.path.join(os.path.dirname(outfn),playlist.name()+".m3u")

outf = open(outfn, "w")

outf.write("#EXTM3U\n")

for track in playlist.tracks():
    # Skip any files whose locations aren't currently available
    # If the file doesn't exist on disk, then trying to access the
    # location will throw an AttributeError exception.
    try:
        fileloc = track.location().path
        if not os.path.isfile(fileloc):
            throw(AttributeError)
        # Perform search-and-replace on the file location
        for old, new in sandrStrs.iteritems():
            fileloc = fileloc.replace(old, new)
        durstr = "%d" % math.floor(track.duration())
        outf.write("#EXTINF:"+durstr+","+track.name()+"\n")
        outf.write(fileloc+"\n")
    except AttributeError:
        print "\""+track.name()+"\" isn't available on disk. Skipping."

Converting iTunes Playlists to M3U Playlists

Because I have a crazy byzantine digital music setup, there are times when I want to take an iTunes playlist and move it to our Xbox running XBMC, because the Xbox has nice speakers whereas none of our iTunes-running laptops do. XBMC, like all sane media players, accepts M3U playlists. iTunes, however, will only export playlists as plain text files or in their plist XML format. Why? Because Apple. So I’m left needing to convert the XML files to M3U format.

Luckily, I know Python. Even more luckily, so do a lot of better programmers than I.

Digging through some mailing lists turned up a plist XML format parser that Frederik Lundh wrote. Sadly, that link I just gave no longer works. Thank goodness for the Wayback Machine! To keep you from having to re-create his code, I stuck it into a Python module called “plistloader”.


try:
    from xml.etree.cElementTree import iterparse
except ImportError:
    from xml.etree import iterparse
import base64, datetime, re, os

unmarshallers = {

    # collections                                                                
    "array": lambda x: [v.text for v in x],
    "dict": lambda x:
        dict((x[i].text, x[i+1].text) for i in range(0, len(x), 2)),
    "key": lambda x: x.text or "",

    # simple types                                                               
    "string": lambda x: x.text or "",
    "data": lambda x: base64.decodestring(x.text or ""),
    "date": lambda x:
        datetime.datetime(*map(int, re.findall("\d+", x.text))),
    "true": lambda x: True,
    "false": lambda x: False,
    "real": lambda x: float(x.text),
    "integer": lambda x: int(x.text),

}

def load(file):
    parser = iterparse(file)
    for action, elem in parser:
        unmarshal = unmarshallers.get(elem.tag)
        if unmarshal:
            data = unmarshal(elem)
            elem.clear()
            elem.text = data
        elif elem.tag != "plist":
           raise IOError("unknown plist type: %r" % elem.tag)
    return parser.root[0].text

Do you see what he did there? Frederik used a dictionary filled with anonymous functions that convert each kind of XML data the plist might contain. Sexy!

My code that uses plistloader is far more prosaic.


import sys, plistloader, os

# Search-and-replace strings to adjust the mp3's locations if necessary.         
sandrStrs = { "file://localhost/Volumes": "smb://sargent" }
m3uHeader = "#EXTM3U\n"

try:
       xmlFile = sys.argv[1]
except IndexError:
       print "No xml file passed on the command line."
       sys.exit()

if not os.path.isfile(xmlFile):
       print "File %s doesn't exist."
       sys.exit()

# Load the playlist using the plistloader module                                 
playlist = plistloader.load(xmlFile)

# Base the output filename on the input one, stripping off any '.xml'            
# or similar from the right and adding in .m3u                                   
outfn = xmlFile.rsplit('.',1)[0]+'.m3u'

outf = open(outfn, 'w')

# Write the M3U header                                                           
outf.write(m3uHeader)

# Iterate through the tracks to get each one's location and name                 
for k, v in playlist['Tracks'].iteritems():
       # The key in this case is the track ID number. The value is               
       # a dict of all information associated with the track                     
       fileloc = v['Location']
       for old, new in sandrStrs.iteritems():
              fileloc = fileloc.replace(old, new)
       outf.write(fileloc+"\n")

outf.close()

To use the script, export your iTunes playlist as an XML file. Pass the XML filename to the script. If you’re on a Mac, take a look at py2app. It’ll let you turn the script into an application, which means you can then drop the XML file on the script and it’ll auto-process it.

Note that the script includes a dict of search-and-replace strings in case you need to fiddle with the mp3 files’ locations as reported by iTunes. As you can see in the example above, I needed to change iTunes’s “localhost” reference to match my SMB share.

525,600

In 2008 Liza began speaking.

In 2008 my grandfather died.

In 2008 I was a guest at a conference dedicated to internet memes.

In 2008 I saw my friends become the parents I always knew they could be.

In 2008 I flew back from California to go to Misty’s grandfather’s funeral.

In 2008 the U.S. had an historic presidential election.

In 2008 two of our best friends became pregnant again.

In 2008 the world’s economies tanked.

In 2008 Eli played soccer.

In 2008 I was a guest at an SF conference to talk about real science.

In 2008 we didn’t have friends over as often as we used to.

In 2008 I had intense and meaningful conversations with good friends.

In 2008 Misty’s grandmother died.

In 2008 some of our friends got divorced.

In 2008 some of our friends got married.

In 2008 we re-connected with a friend we’d last talked to five years ago.

In 2008 I sang Christmas music with my church’s choir.

In 2008 I got a new nephew.

In 2008 we traveled to Japan with two of our close friends.

In 2008 Israel stepped up rocket attacks on Palestine.

Let’s see what 2009 brings.