Tagged: Helpful Applications

You Got Your Ogg in My Vorbis! Tiger, Ogg Vorbis, and an (Almost) Developer Blog

I have a couple of music files in Ogg Vorbis format, a format that iTunes does not support by default.

Before, I used the Ogg Vorbis QuickTime 6.2 component written by Jordan Mendelson. Notice, however, the “6” in that title. Mac OS X 10.4 “Tiger” uses QuickTime 7. If you come to a Ogg Vorbis song file in your iTunes playlist on 10.4 when you have Jordan’s component installed, iTunes crashes.

No good! Luckily, Arek Korbik has written a new Ogg Vorbis QuickTime component that works with QuickTime 7.

Even cooler than that, the above page is really a bit of a developer Weblog, describing some of the steps he’s taken to make the component. If he got himself an RSS feed, I’d subscribe. He even has a teaser: “Watch this space.” Guess Apple isn’t the only one keeping secrets, eh?

Honey, I Shrank the Partition!

Luis de la Rosa asked in a comment to this post about my experience resizing partitions.

Before Monday, my experience was nil. The Mac traditionally hasn’t had utilities that can resize partitions, and OS X especially has had none.

That’s changed. Now, there’s VolumeWorks ($59.95) from SubRosaSoft and iPartition ($44.95) from Coriolis Systems.

iPartition is cheaper: is it better? VersionTracker says so, 4 stars versus 3 stars. I decided to buy it and try it.

First of all, it doesn’t come with a bootable CD. The Web site directs you to BootCD by CharlesSoft, but that is not compatible with Mac OS X 10.4.

I got around this problem by attaching my laptop to my tower via a firewire cable and booting the laptop into target mode, so the partitions showed up in the Finder on the tower. iPartition can resize the partitions of a drive connected via FireWire just fine.

First, I copied the entire contents of all the laptop’s partitions to my tower. I used cp from the command line: on 10.4, cp will also copy resource forks.

I also used Apple’s Disk Utility application to make sure all the laptop partitions were OK.

I used the bundled program iDefrag Lite to compact the used bytes of my data partition, then used iPartition to shave 15 Gb. off of it and distribute them to the three system partitions. The UI for this in iPartition is especially nice: you drag the sides of brightly-colored pie wedges representing the partitions on disk to make them bigger or smaller. A selected “slice” is half-removed from the pie, so it’s easier to see and manipulate.

All the steps together took maybe 8-9 hours.

I rebooted the laptop, and haven’t had any problems yet.

svnX: A Review

svnX looks like it’s the most full-featured GUI Subversion client on the Mac. Nate Silva asked me about it way back in this comment in my first Subversion post. So, how is it?

It’s got a good deal of the functionality I want.

• I can see the state of the files in my working copy: modified, added, removed.

• It supports visual diffs, and for extra points, it supports all the major external apps that provide this.

• For a repository, it can show me all the files affected by a particular check-in. It supports deleting, moving, and copying files in the repository.

All in all, it’s a workable replacement for Xcode’s Subversion support. That’s how I use it, as an occasional replacement, to deal with the Subversion work I need done for files that aren’t in my Xcode project.

Now, before I get to what I don’t like about it, let me acknowledge two things.

One, svnX has been released under the GPL. I could dive into the code myself and fix the problems I’m going to describe. Unfortunately, I’m already in the middle of a project – that’s what I’m keeping in my Subversion repository, and why I need a Subversion client! That said, I may take this up at some point.

Two, I want to keep my criticism of the application separate from the application authors. I treat the failings of a project like this, done for free and presumably in one’s spare time, far differently than I would treat even a shareware application.

I said svnX had most of the functionality I need. But in the realm of polish, it is disappointing, shocking even.

Have a look at the screenshot of the repository window. Notice anything strange in the uppermost table? What’s that first column of radio buttons doing there? To do a diff between two check-in versions, I shit you not, you need to select one of them via the radio button column, and the other by a more normal selection highlight, and then click the FileMerge button.

Why is the UI set up in this bizarre manner? I don’t know for sure, but my suspicion is because it was easier. In Cocoa nibs, tables can be set to allow only single-row selection, or multiple-row selection. Multiple-row selection, as you can imagine, involves a lot more work to handle all the different possibilities. But it’s what users expect.

Actually, I simplified things a bit. Hitting the FileMerge button doesn’t go directly to a file merge. It actually brings up a sheet with exactly the same two tables that are at the top of the window the sheet is attached to, from which you have to select the versions you want to compare. What does that sheet refer to? It turns out, it refers to the file selected in the third table on the main window, though the sheet gives you no indication of that. You can’t multiple-select in that file table, either, so you can’t do several file comparisons at once.

svnX has separate windows for Subversion repositories versus Subversion working copies. You can see a screenshot of the working copies window here. You’ll notice this window is much more simple. The repository history is completely unavailable. All you can know from this window is whether any files have had changes made to them since the last check-in.

Again, I’m assuming the reason this was done was to make things easier. It would be much harder to create an intuitive user interface where the information about a working copy is overlaid on the repository itself…but that’s what I want.

I want to be able to compare my working copy file’s condition against what was checked in 10 revisions ago. I want to be able to see what check-ins were made on the files that I have edited, in the same table – a column you can hide, perhaps, so it’s not always cluttering up the window?

I want to be able to perform file and folder moves in the working repository before checking them in: right now, you can only do that in svnX in the repository window, where changes are immediate.

I want to be able to go from the row representing the file to the file in the Finder. Contextual menus seem totally unsupported.

There’s probably more, but this will do. Some of this stuff is small potatoes, but if I were to work on this, I’d want to tackle the big stuff first, which would probably mean rewriting a lot of the UI code. Not something to be undertaken lightly.

Before I go, I’m going to have to take issue with the name. “svnX”? You name a GUI application after Subversion’s crypticly-named command-line tool plus an “X” to show it’s on Mac OS X? Is that the best you can do?

Here are a few suggestions, marked as (taken) if I found an app with that name in http://VersionTracker.com:

“Subversion” sounds like “Subversive”, right? So how about: Saboteur (probably not), Instigator, Agitator, Provocateur (I like that one).

You’re gaining access to an otherwise unreachable destination, like a castle, right? So how about: Drawbridge, Bridge, even Moat.

It’s a record of changes, so how about: History (taken), Historian (taken), or Archiver. You use it to find or figure things out, so maybe: (Code) Detective, Codehound, maybe even Code Thief.

Finally, I’ll end on a positive note: I like the swirly blue icon.

Mail Enhancement

I like partitions. Got a bunch of ’em on my laptop: several smaller ones, and a large one for data. It’s an easy way to test different OS versions.

Easy, at least, until the OS started taking up so much damn space! Now, I regularly fill up the smaller partitions. One solution is to resize them, an issue I’ll get to later.

But another solution is to move the large personal data stores that are normally replicated on each OS partition to the data partition, where they belong.

For example: my email. Mail normally stores its data in ~/Library/Mail:

POP:
Apple Mail POP account advanced tab, showing Account Directory setting

IMAP:
Apple Mail IMAP account advanced tab, showing Account Directory setting

But I’m never prompted where I want to put this Account Directory, it always defaults to ~/Library/Mail, and as you can see, it’s dimmed, so I can’t change it in the user interface once the account has been created. Well, there may be a way, but it probably involves throwing away all the messages I already have, which I don’t want.

All the information on my accounts is stored in the plist file at ~/Library/Preferences/com.apple.mail.plist. Ah, that’s easy, I think to myself, I’ll just open that file in a text editor and I’ll….

Bzzzt! (Notice how I like that word?) The plist is in binary format: I wouldn’t recommend trying to modify it with TextEdit.

For this, I’ll need to open the plist file in Property List Editor, which is available, after an Xcode Tools install, at /Developer/Applications/Utilities/Property List Editor.app.

I use the "Dump" button in the upper right-hand corner of the Editor window to get a dump of the plist file as text, and then copy that text to TextEdit (or a better editor such as BBEdit) and save it off somewhere.

Now, I need to search on every instance of ~/Library/Mail/ in that file, and change that path to the new path I want, /Volumes/Data/Mail/. The primary location for this in the plist is: MailAccounts → <account dictionary> → AccountPath.

What’s surprising is that this isn’t the only location where I find that path. In fact, it seems that the full path in the file system to the account directory is what’s used to refer to that account throughout the plist. I make sure to change them all.

The plist also contains the path ~/Library/Mail Downloads. I change that to /Volumes/Data/Mail/Downloads, just to keep all my Mail data in the same Mail folder.

Now that I’m done with the find-and-replace steps, I close Mail and back up all its data. Very important!

Next, I go to the ~/Library/Mail folder. I find the folder called Mailboxes, if it exists, and copy it to the new location.

I find every folder of the form ACCOUNTTYPE-username@account.domain.com, where ACCOUNTTYPE is IMAP or POP, etc., and account.domain.com is your incoming mail server, and copy them over as well. I don’t copy everything in ~/Library/Mail.

I copy the ~/Library/Mail Downloads folder into the new Mail folder, and rename it just Downloads, to match what I specified in the new plist, above.

Finally, while Mail still is closed, I replace the old binary plist (which I also backed up) with my newly edited, text plist. I say a little prayer, and reopen Mail.

It works!

Apple Mail changed Account Directory setting

Finally, once I’m sure everything is working, I get rid of the Mail folders on my OS partition. I follow all the same steps as listed above for my other OS partitions (except for populating /Volumes/Data/Mail, which I do only once with the most up-to-date data), and I’m done.

Feedback #1 If all I have is IMAP accounts, why not just go ahead and never store anything locally? Problem solved!

For one, IMAP is slow enough as it is: if I have to download all my messages from the server every time I open Mail, it’ll go even slower! For two, Mail tells me it won’t be able to check for spam under that configuration, though I haven’t verified this.

Feedback #2 If you do steps X, Y, and Z, you can get that widget to activate, and move the storage. Why not just do that?

As I said above, there may be a way to change the Account Directory value in the UI, but I suspect it only lets you do that if you empty your local storage, which I don’t want to do. If you do find some other series of steps that don’t have that drawback, let me know!

Also, remember that Mailboxes folder I moved? That holds all the local mailboxes I made, via Mailbox→New Mailbox…. I can’t move that to my central location without delving into the Mail plist as I’ve described above.

Update: There are a couple of good comments that describe both simpler and yet more all-or-nothing solutions than the one I proposed. Have a look!

Also, I originally advised moving the folder Icons, but it’s both not where I said it was, and you shouldn’t move it. It’s not at ~/Library/Mail/, it’s just at ~/Library/, and that’s a good thing, because the icons are used by more than one application. So leave ’em there!

Synchronization Whack-a-Mole: Deleting a Subscription from NetNewsWire Across Several Machines

Let’s say I’ve got NetNewsWire installed on two different machines, and I dutifully synchronize each machine’s copy of NetNewsWire on both opening and closing via NetNewsWire’s .Mac synchronization feature.

Let’s say I get sick of a particular RSS feed, such as, say, Ranchero.

I delete it from machine #1 and close NetNewsWire (and synchronize).

I open NetNewsWire on machine #2 (and synchronize). Ranchero is still there! I close NetNewsWire (and synchronize).

I open NetNewsWire again on machine #1 (and synchronize). Hey, Ranchero is back here now, too!

Rinse, repeat.

It’s probably happening because I chose the “Merge my list with the list on the server” option, instead of the “Make my list a copy of the list on the server” option.

But I shouldn’t have to choose the second option, and lose any changes from a second machine if I have two copies of NetNewsWire open at the same time – say, because I’m testing on two machines at once – in order to get the benefits of object deletion from .Mac synchronization. Deletions should propagate.

Otherwise, when I want to delete a subscription, I’m going to be playing whack-a-mole forever – or have to remember to delete the subscription manually from each machine at the same time. And isn’t that sort of manually synchronization exactly what .Mac synchronization was supposed to help you avoid?

P.S. In this case, the Ranchero feed’s survival isn’t so bad, since I was only using it as an example and want to keep it.

P.P.S. Yes, this is a lazyweb bug report, since Brent has shown the unnerving capability to hone in on my NetNewsWire posts without any further prompting. If I don’t hear from him in a couple of days, then I’ll email him.

What the World Needs…

This is a helpful application that doesn’t exist yet, that I know of.

It works inside Mail. It lets you select an email message, or text inside an email message, select something from a contextual menu, and have your Address Book automatically updated with the phone and address in that email or text.

Even better, possibly, is an application that can scan all your emails and find the ones with text that looks like contact information (numbers formatted like phone numbers, and “Street” or “Drive” or variants). It maps the sender addresses to your Address Book entries, and offers to change them all en masse.

Even better than that would be an application that, in addition, does this when you first receive email, and makes the changes semi-automatically. By “semi-” I mean it presents you with exactly what information it’s going to change first, and allows you to edit what changes it makes or cancel them individually. (Something I’d really like to see more of in Sync Services, by the way.)

Time and time again, I look up someone’s contact information in Address Book, and it’s outdated. They’ve sent me an email with the new information, so I have to hunt for it, and do the tedious cut-and-paste from one application to another.

I would pay for this application.

Better make it fast, though; sounds like Audigone material.

On the Move, Part I

I’m copying a bunch of applications over to a new machine. Replicating the settings for those applications is more application-specific than I was expecting. Here are the two I’ve tried so far.

MarsEdit:
I love MarsEdit primarily for its preview template. I could use my weblogging software’s posting mechanism instead of MarsEdit, but that software’s preview doesn’t actually make the previewed post look like it will look in my weblog. MarsEdit can do this.

But after I copied the preferences file (com.ranchero.MarsEdit.plist) from my user-level Library/Preferences directory on old machine to my new machine, MarsEdit still used its default preview template. I had to also copy over everything from my user-level Library/Application Support directory in order to get those settings.

Now, Apple’s guidelines say that the Application Support directory is for files like “document templates and sample files.” I am interpreting that to mean unchanging template files that ship with the software, such as e.g. Microsoft Word’s various letter document templates. I don’t think that means things the user can configure, which I think should go under Preferences.

However, other applications also dump files with user info in the Application Support directory. Firefox seems to put your entire profile there, for instance.

I’d rather not have to look in two places for files with user configuration info, but the guidelines don’t seem to provide crystal-clear guidance on the issue.

DragThing:
For DragThing, as for MarsEdit, the first thing I tried was just copying over the preferences file. This failed for DragThing as well, but not because there were missing Application Support files. Instead, in order to make the preferences file work in the second DragThing, I had to explicitly import the preferences file.

How did I know to do this? Because DragThing’s import window specifically says, “Select a folder, XML dock file, or “DragThing Preferences” file to import.”

Not sure what I think about this. On the one hand, the UI is clear and intuitive. On the other hand, why do I need to go through an import? Why doesn’t just copying the files work, like it used to work for almost every application?

Does it work anymore for any application? Stay tuned.