Blogging From Windows

September 7th, 2007

News of MarsEdit 2.0 has spread like wildfire, thanks in no small part to people like you blogging about the news and sharing it with all of your friends. Please don’t stop!

One of the side-effects of this massive news-sharing is I am getting requests from people to release a version of MarsEdit for the PC (for Windows, that is). I addressed this in the comments on Guy Kawasaki’s blog, but I thought I’d reiterate and expand on that here.

I love writing software for the Mac. If I had to write software for another platform, I probably wouldn’t be nearly as interested in doing it. Heck, I might work more on becoming a musician, or a designer, or one of the other many trades that I have an interest in. For that reason, the chances of MarsEdit for Windows are almost nil. There would have to be an incredibly sweet deal, like “this technology makes it painless to deploy your Mac app on Windows!” Not likely.

Fortunately there are some brilliant developers on the Windows side who apparently do like developing for Windows. At least I assume as much because their products are fine-tuned in a way that only happens when somebody cares about and enjoys their work. In many ways, I see these guys as Mac developers who ended up programming for Windows. Lucky for Windows users!

Believe it or not one of the leading products for blogging on Windows is from none other than Microsoft itself. Windows Live Writer is the desktop blogging component of Windows Live. Or something. I don’t know what the heck all that junk means, but I know that when you launch Windows Live Writer, you will feel transferred to a magical place, free of the usual stereotypes against Microsoft products. (Some of Microsoft’s Mac software also achieves this).

Kudos to Microsoft for achieving excellence in a field near to my heart. Joe Cheng, one of the product’s developers, also stays in touch with myself and the Atom Publishing community, sharing his opinions about the ever-evolving client development world.

BlogJet is another excellent application, and is dear to my heart because it’s developed by indie developers. And look! It has a cute globe-oriented icon. We were bound to be app-buddies. The Coding Robots, Dmitry and Vladimir, are a couple guys running a (mostly) Windows software startup near Moscow in Russia. They have a very entertaining blog where you can catch glimpses of what it’s like to run a Russian indie software business. I especially like the toilet paper dispenser that looks like a robot!

I mentioned that the Coding Robots are “mostly” Windows developers, but it turns out that at least Dmitry is also a huge Mac fan. He does most of his development on a Mac, even though the flagship product of the company is Windows-only. I expect to see more offerings for the Mac from these guys, because I’m sure by now Dmitry has caught “Cocoa Fever,” big time. In fact, Dmitry just released a public beta of his upcoming Mac OS X application, Mémoires, which is about the simplest journal-keeping application you’ll ever see, but is very elegant and easy on the eyes.

In fact, the only glaring omission I see in Mémoires is a “Send to MarsEdit” option. Add that, and we’ll be cooking!

Perfect Preview With MarsEdit

September 6th, 2007

One of the most time-saving features of MarsEdit is its Preview window, which uses the power of Safari’s WebKit to render a browser-perfect version of your post before you send it to the blog. This is fantastic because you can spot formatting errors and typos before publishing the item.

Unfortunately, the initial setup is a little bit daunting. Straight out of the box, MarsEdit’s preview looks pretty bland. It won’t have any of the fantastic stylings of your blog until you edit the “template” that MarsEdit uses to generate the preview.

To be sure, there’s a lot MarsEdit could do to make this template-editing process easier. For instance, Windows Live Writer uses a nifty trick where it posts a temporary entry and then immediately deletes it, so that it can get a “reference” page to build a template from.

I’m going to look at ways of streamlining this process in MarsEdit, but for the time being I thought it would help to post a sort of tutorial about how you can get your own blog set up with “perfect previews” in MarsEdit.

Step 1: Open A Reference Entry

We’re going to build your template by starting with a “typical” entry page from your blog. Go to your blog and click on the title (usually) of one of your posts, to get the “all on one page” view. For instance, here’s the single page view for this entry.

From your browser, select “View Source.” This varies from browser to browser but in Safari you can just control-click the page content and then select it from the menu.

Step 2: Copy HTML Into MarsEdit

With a post editor window open in MarsEdit, click the Preview icon in the toolbar to open the Preview window. Then click the “Edit Template” button in the lower-right corner of the window. You’ll probably see the default template that MarsEdit uses for all new blogs. Delete the default template text to make room for your custom template.

Copy the HTML source from the web browser’s “View Source” window and paste it right into the MarsEdit template window. You should immediately see the preview window become a lot more like your blog looks on the web!

Step 3: Fix Links

This won’t be necessary for all blogs, but if your HTML has relative links in it, you’ll need to replace those links with full links. For instance, if your HTML links to CSS style sheet like this:

href=”blog/wp-content/themes/rsbubbles/style.css”

You’ll need to change it to include your host name:

href=”http://www.red-sweater.com/blog/wp-content/themes/rsbubbles/style.css”

You’ll probably know that you need to find some more links to change because something is missing or just doesn’t look right in the preview. Try Cmd-F to search for “href” and “url(” in your template.

Step 4: Insert Placeholders

By now you should have a pretty good looking preview! The only problem is, it shows you the content of your reference post! You need to insert placeholders where all the “interesting things” are. So you squint your eyes and go scrubbing through the template, looking for the “content” and replacing it with a template placeholder. Try Cmd-F to search for the first word in your blog post, and then select the text and all its HTML until you get to the end of the blog post. Delete all of that, then select “Insert Placeholder -> Body” from the placeholder popup.

Do the same for your post’s Title, Categories, etc. You’ll see your template start to magically come to life as a perfect mirror of the post you’re currently editing.

Caveat: Because of the way MarsEdit’s “instant” updates work in the preview window, you can’t use placeholders in the <head> secton of your template. This usually isn’t a problem, because you can use hard-coded references to your blog’s CSS files, etc.

Final Touch: Font Size & Style

As a final touch to make the content match the way it looks in your favorite browser, make sure to change the default preview fonts in Preferences -> Preview. You can look in your browser’s preferences to find the default fonts you’re using there, and ensure that you get the same look in MarsEdit.

As I said, the process of setting up a perfect preview is a bit tedious, but the results are simply amazing. For instance. I’m about to publish this post, and before ever seeing it on the web, I know just what it’s going to look like:

I hope you’ll find MarsEdit even more enjoyable after learning how well it can preview your posts.

MarsEdit 2.0 Is Out!

September 4th, 2007

Wow … I thought I’d try something new this time and release a product in “the wee hours.” So I put all the pages up live late last night, thinking they would be there in case anybody saw them.

Then the little “cash register” noise on my email started going off. Nice! The reaction to the public release was almost immediate, so I couldn’t go to sleep quite as instantly as planned. When I finally did grab some shuteye, I woke up to a world on fire with MarsEdit joy!

Err, let’s just say, people were ready for this upgrade, and so far, they seem to be really loving it.

Read the What’s New page for MarsEdit 2, to get a sense for what the major changes are in this revision.

Visit the MarsEdit Home Page to download a copy if you haven’t tried it yet!

I’m really excited to be able to share the app with all of you, after several months of hard work.

Markdown Scripts For MarsEdit

August 26th, 2007

Drew Thaler has put together a pair of scripts for streamlined use of Markdown in MarsEdit, when the blog server is not configured to automatically process Markdown for presentaton.

Markdown Scripts For MarsEdit

With Drew’s scripts, you can write a post entirely in Markdown, then easily convert it to HTML before sending it to your weblog. He also provides a reverse script so you can edit existing posts by first converting them to Markdown, editing them, and converting them back before republishing. Nifty!

This is a really cool example of a MarsEdit user taking good advantage of the scripts menu to extend the application’s functionality. As you might imagine, I get a lot of requests from users who want to see a particular feature added to MarsEdit. I love it when the feature can be sort of “prototyped” as a proof of concept with AppleScript. I could see functionality like what Drew has put together being incorporated into the standard distribution of MarsEdit at some point. As development moves forward for 2.1 and beyond, I am going to aim for making the app even more user-extensible, because that’s where the most exciting ideas comes from. It’s ideal when users can not only come up with the idea but also implement a working example!

If you’re interested in Markdown but not using a weblog server that supports it natively, Drew’s scripts might make a nice addition to your MarsEdit configuration!