Tips: Setting up Scrivener to Compile MultiMarkdown

Back in August I wrote a post about using Literature and Latte’sScrivener as a complete Blogging System“. What I wasn’t expecting was how that post drummed up a lot conversation about MultiMarkdown and writing in Markdown in general. After going back and forth with you all (a genuine pleasure), I realized that I hadn’t really covered the process of exporting your MMD documents from Scrivener into clean, valid html for whatever web-based platform you were using.

I thought I’d take care of that now and write a companion piece on both setting up Scrivener to use Fletcher Penney’s MultiMarkDown and, once installed, how to easily compile your documents and export them as clean html that you can then copy and paste into the WYSWYG of your preferred blogging platform.

First, let’s get MultiMarkdown installed (if you don’t have it installed already)…

Markdown Export

One thing I failed to mention in that original post was that you actually may not have MultiMarkdown installed on your computer. I say this, because I didn’t. The easiest way to tell (without using the command line)? Open Scrivener, click the Compile button and hit the drop down at the bottom. If you see just “MultiMarkdown” as an option and nothing else, you don’t have everything you need to compile your MMD document into html.

Here’s what you need to do (don’t worry, it’s easy I promise):

  1. Go to Fletcher Penney’s MultiMarkdown downloads page and grab the install that matches the OS you are using on the computer in front of you. I usually download to my desktop to find it easier.
  2. Unzip the file that downloads and double-click the installer within.
  3. Follow the onscreen directions to complete the install.

That’s it! Told you it was easy.

What now?

If you had Scrivener open prior to the download, save your project and quit. Now re-open Scrivener and you should now see a whole new host of MultiMarkdown options under the drop down at the bottom of the “Compile” menu!

mmdoptionsinscrivener

For most of you, the “MultiMarkdown -> Web Page (.html)” option is all you need. Click that and then click the “Compile” button. Again, I like to save the exported .html doc to my desktop to find it easily, but feel free save the document wherever you like and open it in a text editor. To do this, right-click your new .html file and choose an editor like Textmate, Coda or even good old Notepad. Once open, you’ll see that all of your MultiMarkdown has now changed from this:

mmdcode

To this:

ScrivMMDExport

The code you are interested in (unless your working with a static HTML-based site) is within the opening and closing body tags (<body></body>). Copy that code and post it into your site’s editor. When you do this, make sure you are in HTML mode in your site’s editor (in WordPress it’s under the “Text” tab), otherwise you’ll end up with a post contains all of your text as well as all of the html tags. Trust me, it looks funny and broken when you do it.

Hey, this is great! Thanks! But what’s the point to all of this?

Well, put simply, WYSIWYG editors have come a long way over the years, but they are still far from perfect.

If you’ve ever written a post, pasted it into the editor of your site and spent the next hour cleaning up code the editor thought you wanted, you probably wouldn’t want to write on your web site again for a while. On the flip side though, these same web site editors will just about always take clean and valid html code and render it correctly – displaying everything just as you’d expect. Still, trying to write in html (not to mention valid html) is a pain in the butt too – we shouldn’t have to frankly – and, luckily, with Markdown we don’t have to.

That’s why it’s so damn convenient that Scrivener supports it!

What this post didn’t cover. (aka: I smell a series comin’ on!)

I didn’t go over actually writing in Markdown.

I am assuming if you read this far, you already know how to write in Markdown (which lends easily into MultiMarkdown) and that wasn’t really the point of the this post anyways.

If there is interest, I’d be happy to write another post on how I write in, and rely intrinsically on, Markdown for all of my web publishing. If you’d like to hear more, leave any specifics in the comments below (even if it’s just a “Yes please!”) and I will do my best to accommodate them in a future post.

Hope you found this useful! Now get back to blogging in Scrivener!

Tips: Stretching an iPhone 5 Battery Through a 6 Day Hike in Yosemite National Park

This will be a quick one folks! I just wanted to share how I made a stock iPhone 5 battery stretch 6 days on one full charge while using it only as a camera.

When traveling, I really love using my iPhone as my main point-and-shoot. Does it best my wife’s DSLR? Hell no, not even close. But it does take decent photos if you’ve mastered its quirks and the portability of it is second-to-none.

Upper Cathedral Lake

But what about on hiking trips? Not car-camping mind you, but hiking out in the middle of nowhere, where the nearest power outlet is literally days away?

In those cases you could either bring one of the many portable solar chargers that are now available at any camping/outdoor gear store, or even a hand-crank generator, but that’s just extra weight for me to lug around, not to mention misplace or lose. So when my week-long hike in Yosemite came along, I wanted to see just how far I could stretch a single charge on my iPhone 5, all while using it to snap frequent pics of the stunning beauty out there (and man, there is SO much!).

Now, on a typical day I use my phone to such a degree that I rarely get through a full 24 hour period without plugging it in. I am sure many of you can relate. So how did I accomplish 6 days straight? Let me tell you!

Dim Your Screen Brightness

Brightness Settings

Go under “Settings” and tap “Brightness & Wallpaper”. In that menu, use the slider to bring your brightness down to 50% (or as low as your poor eyes can stand).

Airplane Mode is Your Friend!

Turn off Airplane Mode

Tap “Settings” (if you aren’t still in there) and right up at the top you’ll see a toggle for “Airplane Mode”. Turn this bad boy on and leave it. This turns off your cellular service, WIFI and your Bluetooth connectivity. With this turned on, your phone stops continuously looking for something that, out in the middle nowhere, it will never find. If it was constantly searching? Your battery would be dead in way less than a day. So at the very least, switch Airplane Mode to the “on” position.

Turn Off Location Services

Turn Off Location Services

Tap “Settings” again, go down to “Privacy” and in there you will find “Privacy Services”. Click on that and hit the toggle at the top to turn that off. You will lose the geolocation of the pictures you snap, but the accuracy of that gets dodgy anyways when you are that far off of the grid.

Basically an iPod Touch…

That’s all I turned off! With all these services off, you’ve basically got an iPod Touch, but you can still utilize your camera (which I used continuously from the slider on the lock screen), snap a pic, check it out and lock the phone immediately afterward.

So how did this all work? Quite well! So well in fact that I took well over a hundred shots (a bunch of panoramas too) and, with less than 48 hours until I was back in civilization, I still had 50% battery left! I know! Not bad!

I am sure a lot of folks have tried this combo with varying degrees of success, but sometimes it’s good to read about a use case that actually occurred and worked. If there are any other services I missed let me know!

A Bit on Common Sense

I know it goes without saying but… I when I was hiking, I was with 4 other people who all had charged phones, compasses and maps on them… in other words: don’t take chances. If your phone is the only thing you have as a link to possible rescue, don’t try this out. It’s not worth it.

But, if you are properly prepared, I whole-heartedly recommend leaving your iPhone charger back in the car.

Out there it’s not going to do you any good anyways. ;)

Have fun and be safe!

Tips: Creating a KeyBoard Shortcut for “Private Browsing” mode in Safari…


Window for enabling Private Browsing mode...

For a variety of reasons I often find myself going into “Private Browsing” mode when using Apple’s Safari browser on my Mac. Maybe I am on a public wi-fi connection at a coffee shop, or maybe I am using a friend’s Mac for a quick Google search and want to give it back precisely how I received it – private browsing mode can be a handy way of accomplishing “leave no trace” browsing whenever it is needed.

Regardless of the need though, I really hate the process of enabling it: once in Safari, click the “Safari” menu in the top left menu, click “Private Browsing…”, then click “ok” on the window that pops up shortly afterwards.

Is this really that much of a big deal to do? Of course it’s not. But wouldn’t it be easier if there was a keyboard command/shortcut to toggle private browsing mode on and off without touching your mouse or touchpad?

I think so and, luckily, it’s really easy to set up.

The Steps…

1. Click the Apple Menu in the upper-left corner of your screen.

2. Choose “System Preferences” from the drop down menu.

3. Select the “Keyboard” option under “Hardware”.

4. Click the “Keyboard Shortcuts” toggle at the top of the window.

5. Then click “Application Shortcuts” in the left column.

6. Now you just click the “+” button to add a new shortcut.


7. In the new window that pops up, select “Safari” from the top pulldown menu.

8. In the “Menu Title” field, type “Private Browsing”.

9. In the “Keyboard Shortcut” field, type what ever you want your shortcut to be. For me I chose “Command-Control-P”.

10. Click the “Add” button and you are done!

The Result…

Now when you are in Safari on your Mac and you want to quickly go into “Private Browsing” mode, all you have to do is type your new shortcut and it instantly toggles it on! To turn it off, just type the shortcut again. It’s that simple.

I am absolutely sure this tip can be found elsewhere on the internet (there’s no way this is a “new” idea). But I just wanted to write a quick walk-through on how to set it up for you all.

Hopefully it’s useful to you too! :)

Tips: Rotating Video Files in OSX

UPDATE 01/22/2015: Hey guys, over the last year or so I’ve had comments (below) on this post where people have had issues with rotating their videos and saving them afterwards. There are many video formats out there that can easily play on a Mac, but may not play nicely with QuickTime. In my case, my video file was already QuickTime compatible (.mp4), so opening, modifying, and saving the file was easily achieved. If you are using any other format, QuickTime will try to either convert before it opens it, or simply not open it at all. If it converts, there is always a chance of file corruption (though I’ve personally never run into that).

Lastly, this isn’t a QuickTime support site. I will vouch for the steps below, as they work perfectly for me even today. But if they don’t work for you, there isn’t a whole lot I can do to make that situation better for you. You’d be better off hitting up Apple’s support forums.

Now, on to the original post!


Hey guys just wanted to post this quick tutorial because, quite frankly, after years of using Mac’s OSX, I still find simple, yet powerful ways to handle those odd technological problems I sometimes run into.

The Problem:

I was at a really wonderful Mardi Gras Celebration in downtown Durham this week and while I was there, I shot some video of the celebration. Well, there was so much going there that I absent-mindedly botched the orientation of the video, shooting initially in portrait and then 2 seconds later, rotating my iPhone into landscape mode.

The iPhone (or iOS I suppose) is somewhat dumb in this regard in that it holds onto the initial orientation of the what you were shooting and does not shift to accommodate a change like going from portrait to landscape on the fly.

So 98% of my video ended up looking like this:

Bad video orientation

In the past when I ran into this dilemma, I often stopped recording, quickly deleted the bad video, used the preferred orientation and then started recording again, not missing a beat.

But not this time.

And while I figured there must be some way to rotate the video after the fact (like countless image editors allow you to do), I was a little surprised to find there weren’t many obvious and easy ways out there. Eventually I found the answer in Apple’s own QuickTime app. Like a lot of helpful things when you are looking for them, the option was hiding in plain site.

Here are the steps:

Step One:

First open your video file in QuickTime. You can either fire up QuickTime first, go to “File” and then down to “Open File”. Or you could right-click the file itself, choose “Open With” and then choose QuickTime.

Step Two:

Once the video is open click “Edit” and you’ll then find the rotate and flip options straight below

Step One

Step Three:

Once you’ve locked the orientation you want, you then have to export your video with the new changes you’ve added. You’ll find the “Export” option under the “File” menu in QuickTime.

Step Two

Choose the file settings you want to export as and click “Ok”, to kick off the export.

When the export operation is complete, you’ll find your new file where ever you chose to save it with the correct orientation!

Correct Orientation Achieved!

This whole fix took me less than 5 minutes to complete, but depending on the length of the video, it could take much longer (or shorter, again, it varies).

Hopefully this helps someone out there who got into a similar jam. Or, at the very least, it’ll add another hit for Google to serve up. I was kinda giddy when I found it myself!

Tip: Getting Rid of Multiple Entries in OSX’s “Open With” Menu…

Hey all, just quick tip before the holidays! The other day I found myself looking once again for a tip to remedy this situation:

random screenshot

The issue, in a nutshell, is that whenever you install a new app update from the Mac App Store, it inserts a copy of the icon in the “Open With” menu when you right click anything. It kind of drives me crazy!

At any rate, I think I’ve looked for a fix at least four times now so, in an effort to prevent that from happening to you (and myself) again, I wanted to post it up here so I could find it easily.

Now this tip pertains 10.8 (Mountain Lion), but I’m assuming it’d work in previous versions as well. So, to clean this mess up, open up a terminal window (found in Finder > Applications > Utilities > Terminal.app), paste the following command line entry and hit enter (make sure you get all of it):

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

It may take a few seconds to execute but when the command line prompt comes back up, close Terminal and check your “Open With” menu again. It should now be cleaned up, with only single entries listed. On one occasion, this “fix” didn’t take effect until I restarted my mac, but all of the other times I tried it, it was instantaneous.

Is it “bad” to have multiple listings? Absolutely not. It’s just a slightly OCD need to keep things tidy that I have. I have to imagine it drives other people nuts as well. ;)

That’s it! I’d like to wish everyone in the states a happy Thanksgiving! If you’re traveling, be safe and if you are staying home, make sure the turkey fryer is no where near anything combustible.

Have an awesome holiday everyone!