Tips: *Revisiting* My Workflow (again) for Launching .scriv Files in Marked and Scrivener Simultaneously

Back in May, 2014, I created an Alfred workflow that allowed for you to target a specific directory that houses your project files in Scrivener, select your file, and open it in both Scrivener and Marked 2 simultaneously for live preview markdown rendering whilst working in Scrivener.

The theory behind why I created it can be read in the original post here.

A few months ago a kind visitor to this site left a comment stating that the workflow I created, no longer worked properly. It’s been years since I constructed that workflow and since then Alfred, Scrivener, and Marked have gone through several versions, so it didn’t necessarily surprise me that something came unplugged.

Either way, it was an opportunity to revisit the workflow, and I am happy to report that I’ve since fixed it!

If you think the workflow could be of service to you, here are the steps to get it up and running.

One crucial checkbox:

Getting this workflow to function properly involves checking a box in Marked 2’s preferences. So before you do anything:

  1. Launch Marked 2 and click the “Marked 2” menu in the upper-left and then click “Preferences”.
  2. Click the “Apps” tab at the top of the preferences window
  3. Then, under the “Scrivener” section, check the “Open .scriv files in Scrivener when opened in Marked” box. Once checked you can close the preferences window if you want.
Install the workflow in Alfred.

Installing workflows in Alfred is still super simple. If you want to save some time, you can download the workflow file here. Once downloaded, double-click the file and that should drop you into Alfred’s workflow preferences pane, prompting you to import it.

That’s it! From here, you can tweak the workflow to better suit your needs. For instance, I’ve got my .scriv files stored in my “Documents” folder, so you may want broaden, or narrow, the workflow’s search scope.

In short, feel free to make it your own.

The steps to invoke the workflow haven’t really changed:
  1. Bring up Alfred and type “scrivmarked” (again, you can change this keyword in Alfred’s workflow preferences).
  2. Use you arrow keys to scroll up or down to highlight the project you want to open.
  3. Once highlighted. Hit the right arrow key.
  4. Scroll down to highlight “Open in Marked and Scrivener” hit enter.

That should open your Scrivener project in both Marked and Scrivener, ready for you to write blog posts or any content for the web!

Useful links:

Tips: An Alfred Workflow for Launching .scriv Files in Marked and Scrivener Simultaneously

(UPDATE Jan. 2017: A kind visitor recently let me know that the original workflow I created years ago, had stopped functioning properly. I’ve since fixed it and wrote a follow up post here).

A heads up: As the title implies, this post assumes (or, in a way, suggests) that you have purchased Scrivener, Marked and the Powerpack option in Alfred 2.

One of Scrivener’s shortcomings (yes, they do exist) as far as Markdown support is concerned, is its inability to give an HTML preview of your Markdown syntax while you write in it. There is no workflow for accomplishing this other than exporting your MD or MMD, opening it in another editor that reads MD (or the converted html) and checking it there before cutting and pasting the code into your blog’s editor.

In all fairness, that’s not what Scrivener was created to do and just because I’ve found some slightly unconventional uses for it, I can’t expect the good folks at Literature and Latte to change their software to accommodate lil ole me. We all know Scrivener is much, much bigger than blogging and writing in MD and MMD.

The good news is that even though Scrivener doesn’t have an in-app html preview function for your markdown, there is one program that you can use in tandem with it that can.

That Program is Marked.

You can read about Brett Terpstra’s “Marked” in a slew of different places (including its recommendation in the comments on this site ) so I won’t write a review of it here (maybe another time). In a nutshell though, Marked is a realtime markdown converter that works with any text editor you throw at it. Open a text file in its respective editor, open Marked, then drag the same file into Marked and go back to the text editor to continue writing/editing. As you save your markdown document, you’ll see it update in Marked, displaying the converted HTML instantly.

Cool right? It’s also a game-changer.

Marked and Scrivener

Integrating Marked has made my blogging workflow in Scrivener much more streamlined because of Marked’s handling of MD/MMD as well as its plethora of options and amazing tools for authors. But, that all said, getting a file into each application is clunky at best and almost immediately after doing that a couple of times, I wanted/needed to automate that initial step so that it was smoother.

Enter Alfred

Alfred is another popular tool out there whose sole function is to streamline everyday tasks like launching multiple apps at once, finding files quickly on your computer, searching the web, quitting apps, shutting down or restarting your computer… you get the idea. It does all of this from your keyboard and once you get used to its commands, you’ll get addicted to not touching a mouse or track pad. In truth, it’s one of the first apps I install when I get a new computer.

But aside from these baked-in options that you get for free, you can also pay for the Powerpack option and unlock a slew of very powerful tools that give you immense control over your Mac. One of these tools is the ability to easily create custom workflows. Once I encountered the dilemma above, I dove in and immediately came up with a solution.

Now, one caveat. I am not much of a programmer, so I made my workflow out of the built-in modules that Alfred gives you out of the box. I am sure that with some custom scripting this workflow could be made even nicer (if you have suggestions for improvements leave them in the comments below please). That all said, I was really happy with how this workflow came out. To save you (and I) some time I’ve included a link to the workflow below, so that you can download it and add it to your own personal workflows in Alfred. Just download it, double-click and add it to Alfred. Easy.

The way the workflow works is you bring up your Alfred prompt. Type in the keyword, which in my case is “scrivmarked”, that then allows you to browse your “Documents” directory right in Alfred. Once you find the .scriv file you want to open, arrow down to highlight it and hit the right arrow key where you’ll find a file action to open the file in both Scrivener and Marked, arrow down to that action and hit enter.

AlfredFileAction

Make it Your Own

One of the best things about workflows In Alfred is that you can tweak them to suit your needs relatively easily. Hate my keyword? Choose a different one. Have your Scrivener project files in a different location outside of the Documents directory in OS X? No problem, tweak the search scope. These, and many other aspects of workflows, can be tweaked easily in Alfred without knowing a single line of code.

But, again, if you do know a way to make this better, I’d love it if you posted your modifications in the comments below! I am sure there are many ways to make this workflow even more useful to us all!

Useful links: