Archives
Admin / Logout

Adam Merrifield

a picture of me
I am a web designer, theme designer, professional photographer and internet personality. I make many pretty things and I write a lot of content for the internet.

I am one of those guys that, because of the industry I am in, need to be connected at all times. At any given moment you'll find me posting on a forum, updating with twitter, Digging things worthy of attention, uploading pictures, or tagging cool sites.

here i am

seyDoggy Systems:
This is home base, the corporate headquarters, the hub, if you will, seyDoggy.com.

seyDesign news:
these are the RapidWeaver related posts that originally appear in the seyDesign.com blog

Uploads from seyDoggy:
these are the pictures that I upload to flickr

Merrifield Photography:
as a professional photographer I my camera ready at Merrifield-Photography.com.

delicious.com/seydoggy:
these are the websites I want to share or revisit later on. I just tag them on delicious.com.

what i am

I am the owner and operator of seyDoggy Systems, a small theme, code and design outfit based in Kitchener, Ontario, Canada. We primarily develop web based technologies but have begun to dabble in the desktop realm.

what i do

I code like a fool. I design like a fool. I am happiest when I can split my time between the two (though I tire of Photoshop faster then I do TextMate or Terminal), and somehow I have managed to etch out a living doing so.

RapidWeaver Add-ons Version Identifier

RapidWeaver Add-ons Version IdentifierOne thing RapidWeaver does poorly — at this current moment — is help the end user determine the product version they are using on any given 3rd party add-on. Knowing your add-ons (theme or plugin) version number is critical when asking for support and is often one of the first things the developer will ask you for.

If you know where the add-ons are kept (~/Library/Application Support/RapidWeaver/) then you might be able to determine a plugin or themes version number with the Finder, or if you have RapidWeaver open you can find out a plugin’s version by opening the plugin browser, or if you show a themes package contents and…

Well, I like to have these sorts of things at my fingertips and do as little thinking as possible, so I wrote an AppleScript to gather this information for me no matter where I am or what I am doing*:

-- file types to choose from
set rwTypeArray to {"Theme", "Plugin"}

-- choose from those file types
set rwTypeLong to {choose from list rwTypeArray ¬
    with prompt "Which RapidWeaver product type ¬
        you like to find the version of?" ¬
    with title "Theme or Plugin"} as string

-- logic from result
if rwTypeLong is "Theme" then
    set rwType to "rwtheme"
else
    set rwType to "rwplugin"
end if

-- get name of hard drive
tell application "System Events"
    set diskName to (get name of startup disk) as string
end tell

-- get name of user
set userName to (do shell script "whoami") as string

-- select file from RW directory
tell application "Finder"
    set rwFile to (choose file with prompt ¬
        "Please select your RapidWeaver " & rwTypeLong & ":" ¬
        default location (diskName & ":Users:" & userName & ¬
            ":Library:Application Support:RapidWeaver" as alias) ¬
        of type rwType without invisibles)

    -- read version number
    tell application "System Events"
        set rwInfo to (get version of the file (rwFile as string))
    end tell

    -- and display it
    if rwInfo = "" then
        display dialog ¬
            "It seems that your " & rwTypeLong & ¬
                " doesn't have a version number that I can read. ¬
                Sorry.\n\n¬
                Would you like me to reveal it's ¬
                package contents for you?" ¬
            buttons {"Cancel", "Yes"} default button (2)
        set rwPath to rwFile & "Contents" as text
        open rwPath
    else
        display dialog "The version information:\n\n" & rwInfo & ¬
            "\n\n ...has been copied to your clipboard." ¬
        buttons {"OK"} default button (1)
        -- copy to clipboard
        set the clipboard to rwInfo

    end if
end tell

Notes

* If a theme is to have it’s version number read, it must have an Info.plist in it’s package contents. Some theme developers do not include this file. For those that don’t, the script will reveal the theme’s package contents so that you can inspect the version number at the bottom of the Theme.plist file

Download

Get your fresh copy of RapidWeaver_Addons_version.scpt from CodeCollector.net

Comments (1) | Trackback

TextMate Tip: Use Color Picker in All Bundles

After reading this TextMate tip this morning about using the color picker in TextMates CSS bundle, it reminded me of an article I thought I wrote once about extending this same color picker functionality to the other bundles I commonly use in TextMate (namely Property List). After a quick search here and on other blogs of mine, I was unable to find it. So I Googled it and as it turns out, I blogged about it on Flickr of all places. Knowing the information wasn’t of much use there, I thought I had better revisit this tip for the benefit of other geeks.

Use Color Picker in Other Bundles

So here is the gist of it; in the CSS bundle in TextMate you can quickly pick colors for your CSS properties. This is great, but I do a lot with hex colors in other bundles too, like the Property List, Javascript and jQuery bundles. So here is what I did…

I opened the Bundle Editor (⌃⌥⌘B), went into the CSS Bundle, found the “Insert Color…” command and made a copy of it (it’s the ++ icon at the bottom of the panel). I selected and renamed the command and changed it’s Scope Selector from “source.css” to “text, source”. This will enable color picker for just about everything. “text” will cover all of the plain text based languages like HTML, XML, Property List, Markdown, BB Code, LaTeX, etc… While “source” will cover all the programatic languages like CSS, Javascript, PHP, Ruby, etc…

Now keep in mind that this particular command is going to add the hash (#) as a prefix. This may not suite you needs for some languages so you may choose to make another “Insert Color…” command for those languages and modify the appropriate lines, then use “source.actionscript.2″, for example, as your Scope Selector.

Play around with the poosibilities and have fun.

textmate, make use of color picker in plist

Comments (2) | Trackback

Auto mount/unmount your Mac volumes when required

Earlier this month you might recall the solution I gave you for keeping unused volumes unmounted on your mac. The next part of the equation, automatically mounting those volumes when needed to run my backup scheme, took me a little longer to sort out. In fact I wasn’t able to write a solution on my own, try as I might, so I finally went searching for one.

I needed a script of some sort that would mount my unmounted volumes when it was time for ChronoSync to run and then unmount my volumes when ChronoSync was finished. After several IRC queries, forum posts here and there and countless Google searches I finally stumbled upon this post at Mac OS X Hints. This solution was the answer I needed and it works perfectly. I won’t recap the whole thing here, but I will give you the bits that were most important to me.

Copy the following script into Script Editor.app (/Applications/AppleScript/Script Editor.app), changing the diskname and appname to suite your needs:

property diskname : "MyDisk"
property appname : "ChronoSync"

on idle
  tell application "System Events"
    set x to the name of every process
    if appname is not in x then
      if (exists the disk diskname) then
        do shell script "disktool -l | egrep -i "Mountpoint = '/Volumes/" & diskname & "" | cut -d\' -f2 | xargs -n1 disktool -p"
      end if
    else
      do shell script "disktool -l | egrep -i "Mountpoint = '', fsType = 'hfs', volName = '" & diskname & "" | cut -d\' -f2 | xargs -n1 disktool -m"
    end if
  end tell
end idle

Next you need to save it as a bundled app and select “Stay Open“, give it a useful name and save it where you will be able to find it. In my case I chose /Library/Scripts/ChronoSync/:

Save as dialog box in Script Editor.app

Then you have to make it run in the background. To do this, find your newly created app, right click on it, “Show Package Contents“, find the Info.plist and open that in your favorite plain text editor. Above the key that says CFBundleAllowMixedLocalizations you want to add the following:

<key>LSBackgroundOnly</key>
<string>1</string>

Get out of the package and find your app again and double click on it. It should launch in the background but not show in the dock. You can see that it’s running by opening Activity Monitor.app (/Applications/Utilities/Activity Monitor.app):

Activity Monitor showing our disk mounting app working

Now to truly make this process automated, you need this app to be on when your computer is on, so it needs to launch when you login. So open your Accounts preference pane in System Preferences.app (/Applications/System Preferences.app), select the Login Items tab, select the plus button button and add your newly created app:

add your newly created disk mounting app to your login items

And that’s it! Next time your backup program fires up to do it’s regularly scheduled backups, your disk mounting app will mount your volume, wait for your backup app to finish and then quietly tuck your volume back up for the night.

Other references

  1. A Script to mount/unmount a volume on app launch
  2. An AppleScript to mount, run, unmount a disk image
  3. MountPart
Comments (2) | Trackback

AppTrap; the unistaller that makes sense

One thing that’s become increasingly important to me over the years is uninstallers. If an app doesn’t come with one I am reluctant to install it. It became painfully clear recently just how much crap application leave behind when you are done with them and banish them to the trash.

In the last few years a number of apps have cropped up that not only remove the app, but all of it’s associated plist files and folders and what ever peripherals the app has added to your system. I have been using AppZapper for no better reason than in was there, packaged with some Delicious Generation bundle of the time (probably Macheist), but it always struck me as odd that I would have to open an app to move another app to the trash. I presume it’s just to show off their artwork and screen flashy effect more than any practical reason. But to me it just seems like one step too many.

In my hunt for something smarter, I came across AppTrap. This just makes sense to me. It sits in waiting, in your preference pain and if you happen to drop an app in the trash, it pops up and asks if you to get rid of the other crud that goes with it. How smart is that?

No comments | Trackback

Life As a Theme Developer

Have you ever wondered what a day in the life of a professional RapidWeaver theme developer is like? Wonder no more because I am about to tell you.

02-18-09 07:22 – started writing this which will end up being a blog post on seyDoggy.com 02-18-09 07:23 – opening up Mailplane.app to have a gander at what support has crawled in overnight. 02-18-09 07:28 – popping in the the Realmac Software forum to respond to a thread I was notified about… nothing for me to add. 02-18-09 07:40 – helped potting training daughter go to the potty. 02-18-09 07:52 – responded to an email from the seyDesign Member Group. 02-18-09 07:53 – reacted to a Twitter follow request… followed. 02-18-09 07:56 – Twittering. 02-18-09 08:02 – responding to another Realmac Software forum thread. 02-18-09 08:04 – sifting through a bunch of press releases that I subscribe to. 02-18-09 08:18 – responded to a comment on seyDoggy.com blog. 02-18-09 08:19 – moving over to the support email account now. Checking the spam box since Google seems to deem all of my real support requests as Spam. 02-18-09 08:21 – yup, 7 messages caught in the spam box. 02-18-09 08:22 – opening up Parallels to confirm one users report of an IE bug with one of my themes. 02-18-09 08:24 – realizing that their complaint has more to do with screen size than anything else. It’s not a bug, me thinks. Keep testing. 02-18-09 08:28 – just got a wrong number on the support line. “seyDoggy who? I’m trying to call my sister.” 02-18-09 08:38 – yup, IE6 issue was just the end users window size. I like that kind of support. 02-18-09 08:50 – support taking longer then I hoped. Need some tunes. 02-18-09 08:59 – support is done. 02-18-09 09:00 – opening my calendar (a Fluid.app SSB of Google Calendar) to see what’s on the plate. My calendar is my mental mapping tool. 02-18-09 09:19 – more forum posting. 02-18-09 09:20 – back to calendar, deciding how long it’s been since I invoiced this one client before deciding to do more work for them. Have to be extra cautious in todays economy, not to get into too deep with any one client. 02-18-09 09:21 – going to do some site updates (in TextMate) for said client. 02-18-09 10:27 – just answered someones questions about M Cubed Softwares Code Collector Pro. 02-18-09 10:48 – syncing client changes via Panics Transmit. 02-18-09 10:57 – hmm… forgot to update the sitemap… and all the french <title> tags… ugh 02-18-09 11:06 – sitemap updated, french <title> tags updated, re-syncing. 02-18-09 11:26 – fresh coffee, looking at my calendar… what next… 02-18-09 11:28 – checking my @bugs tags in TaskPaper to see if there are any pressing bugs I should tackle… one in seyDoggy bloop! but it’s going to have to wait until I have the time for some extensive rewriting. It’s only an issue with one plugin so it’s not really a bug as much as it’s a compatibility issue. Moving on… 02-18-09 11:33 – continuing with Med Designs Bubblegum.rwtheme update. Adding some really cool new features to it. Checking my todo list within the theme to pick up where I left off on Monday. 02-18-09 11:54 – force quitting RapidWeaver after I jammed it up with a tricky Theme.plist move. 02-18-09 12:22 – commit current set of changes to the rwtheme package go make lunch. 02-18-09 12:54 – exercise… it’s important to get away from the office chair for a bit so you don’t develop deep vein thrombosis, but getting and walking about is boring. So I exercise; 50 pushups, 25 crunches, 20 lying-on-my-back-leg-lift-thingies, 20 of the same, but lying on my side, and then again, but on my tummy. Not only is it good for preventing DVT, but it helps my core compensate for slouching at my desk for hours at a time. 02-18-09 13:17 – back to Bubblegum.rwtheme update. 02-18-09 16:04 – committed a whole whack of changes to the Bubblegum.rwtheme. Time to wonder about the house for a stretch and maybe splash some cold water on my face. 02-18-09 16:08 – scheduled in two custom jobs, one for Friday and one for Monday… sigh. 02-18-09 16:23 – feeling refreshed. Time to get back at it. But it’s time for 10 minutes of fun; time to read a chapter of jQuery in Action. 02-18-09 16:45 – Well it’s time to call it a day and go embrace the inner chef in me. I hope you’ve enjoyed peering into a day in the life of a professional RapidWeaver theme developer.

Comments (1) | Trackback

Mac OS X 10.5.5 comes with new hope

OS%20X%2010.5.5,%20PLEASE%20fix%20the%20Dock.appI am about to install the latest Mac OS X update, the long awaited version 10.5.5. What I am hoping for most is an a fix for the Dock.app crashing all the time. I was able to more or less fix this in 10.5.4 on my own, but I had to take drastic measures a pull out OnyX.app and totally rebuild the LaunchServices, scrub all the deep dark corners, clean caches, kill the odd plist… It was a messy process.

Since having done all that my Dock.app stopped crashing, but I can’t help but feel that there is something inherently wrong with it still. I am hoping that installing Mac OS X 10.5.5 will give me warm fuzzies and restore my faith and elation in Mac updates.

I’ll keep you posted.

No comments | Trackback
Powered by RapidWeaver, WP-Blog and WordPress 2.9.2