Keeping MarsEdit drafts in sync

Software

I have been using MarsEdit since around 2006, and it is without doubt the best tool for managing and writing on blogs. Most of the times, my MarsEdit workflow is really simple: I sit at my desk and write my articles, like I’m doing right now. But not always an article is born, developed, finished and published on the same Mac. Since I keep my main machine, a MacBook Pro, mostly in a desktop configuration, and I’m occasionally working elsewhere, I also rely on two other Macs, both still quite dependable: a 12-inch PowerBook G4, and a 17-inch model. Thus, it’s not infrequent that I start writing down ideas in MarsEdit on either of those PowerBooks when I’m on the move, to then finish and do the final edits at home on the MacBook Pro. Or vice-versa. How to keep things in sync?

True, if I start writing a post on the PowerBook G4 17″, I could simply finish it on the same machine once I’m back home. Or, when I start on the MacBook Pro, I could then bring the MacBook Pro with me, etc. The fact is that I don’t have a comfortable spot in my flat or home office where I could sit and finish things with the PowerBook. And the MacBook Pro is connected with a bunch of peripherals that it’s simply better to leave it there as a desktop machine rather than disconnect everything, especially in cases where I have to just grab a laptop and go away, without much time to plan things in advance. I figured that some way to synchronise things would be a much more hassle-free option.

Being a fan of Notational Velocity, my obvious first solution was to start writing articles there, and then have them ready on whatever machine I planned to finish working on them. It was just a matter of copying and pasting from NV to MarsEdit. The good: flawless, invisible syncing. The bad: not having the little handy tools MarsEdit gives you for text and HTML formatting. Sure, I usually rely on another great tool — TextExpander — for automatically insert HTML tags, but I really missed handy features like copying a link from Safari and just adding it to the selected word with a shortcut. In a nutshell: I liked the syncing, I missed MarsEdit’s interface for writing.

The next thought was: why not use Dropbox? I then proceeded to locate MarsEdit’s Draft folder ([username] /Library/Application Support/MarsEdit/LocalDrafts), create an alias of it, and have the alias point to the original LocalDrafts folder now moved to Dropbox. So easy and too good to be true, I thought. It turns out that this method doesn’t work: after moving the folder, opening MarsEdit, and clicking on Local Drafts in the left sidebar, all the previously saved drafts were nowhere to be found. Evidently MarsEdit doesn’t like having to deal with aliases, but only with true folders.

After thinking about it some more, I managed to find a solution that works for me. It involves splitting the sync workflow a little, but it works. 

  1. I created a MarsEdit/Drafts folder in my Dropbox folder.
  2. On the MacBook Pro, I set up a new rule in Hazel to sync the contents of the original [username]/Library/Application Support/MarsEdit/LocalDrafts folder to that other Drafts folder in Dropbox.
  3. Now, if the other Mac had been an Intel Mac with at least Snow Leopard installed, I could have done the exact same thing in Step 2, but in reverse. I.e., set up a rule in Hazel to sync the Drafts folder in Dropbox with the local MarsEdit Drafts folder. Since the other Macs are two PowerPC machines with Mac OS X 10.5.8 Leopard on them, I simply chose another folder syncing software to do the same thing. Again, here your mileage may vary. I wanted something really simple and that also gave me a bit of manual control on the sync process, so I opted for Matt Neuburg’s SyncMe2 (scroll down a bit in that section and you’ll find it). It’s free, it’s solid software written by someone I trust, and I like that it lets me cherry-pick the files to syncrhonise, if I’m so inclined.

As I said, if you just have to keep MarsEdit’s drafts in sync between two Intel Macs, the cleanest solution is probably to have Hazel handle the sync via Dropbox. If you sync between an Intel Mac and a PPC Mac, it’s only a matter to choose what folder syncing application best suits your needs.


 

Update, December 15 — Luca Soldaini, via Twitter, suggests a possibly simpler solution: using symbolic links (symlinks) instead of aliases. It’s a clever idea, and admittedly I did not think about that (I don’t happen to use symlinks that often). I have tried it and can confirm it works. 

The fundamental mechanism is similar to creating aliases: you put the [username]/Library/Application Support/MarsEdit/LocalDrafts folder in a folder or subfolder of your choice inside Dropbox, then you specify a symbolic link that points to that folder and you place the symbolic link where the original LocalDrafts folder was (in [username]/Library/Application Support/MarsEdit/).

Creating symbolic links is a process that usually involves the Terminal (enter the Terminal and type man ln for more information). But there are also simpler, GUI-based solutions. This 2010 article on Macworld explains how to create a symlink using a shell script and Automator, and also points to another Macworld article where they suggested creating symlinks with AppleScript. But it also points to what is probably the most painless solution: SymbolicLinker, a piece of software created by Nick Zitzmann. 

It’s a free download and consists of a plugin (for Macs running Mac OS X 10.5.8 or earlier) and a service (for Macs running Mac OS X 10.6 or later). Once installed — make sure to read carefully the installation instructions — you will have a new functionality for creating symbolic links via a Finder contextual menu, and it’ll be as easy as creating an alias. Once you’ve installed SymbolicLinker, the method for synchronising MarsEdit’s LocalDrafts folder is simple:

  1. Drag the original [username]/Library/Application Support/MarsEdit/LocalDrafts folder in a folder or subfolder of your choice inside Dropbox;
  2. Right-click or Ctrl-click the LocalDrafts folder in Dropbox and choose Make Symbolic Link from the contextual menu (if you don’t see the command, look under More… at the bottom of the contextual menu if you’re on Leopard, or under the Services… menu if you’re on Snow Leopard and later);
  3. SymbolicLinker will create a folder called LocalDrafts symlink: drag this folder where the original LocalDrafts was (inside [username]/Library/Application Support/MarsEdit/) and rename it to just LocalDrafts;
  4. Repeat Steps 2 and 3 on the second Mac. This way, both Macs will point to the same LocalDrafts folder inside Dropbox.
  5. That should be it!

It is actually easier done than explained. The great thing about this method is that the sync process is ‘invisible’ to the user and totally automatic. Open MarsEdit on Mac 1, write, save the draft, let Dropbox work its magic, go to Mac 2, open MarsEdit, select Local Drafts in the sidebar, and there you have all your drafts in sync. My original method is still valid if you want to have a more fine-grained control over what gets synchronised between the two machines and don’t want everything done automatically behind the scenes. Again, if you choose to install SymbolicLinker, make sure you read the installation instructions carefully.

The Author

Writer. Translator. Mac consultant. Enthusiast photographer. • If you like what I write, please consider supporting my writing by purchasing my short stories, Minigrooves or by making a donation. Thank you!