Automation: Getting Your Words From Scrivener (iOS) into WordPress

Like many out there, I’ve been enjoying the heck out of Scrivener for iOS. The portability, the familiarity with the desktop client, the functionality therein… we all know it was taking its sweet time getting here, but I think we can all agree that the finished product surpassed our expectations.

One thing I was curious about though, was how I could port my original blogging methodology in Scrivener for the desktop, to Scrivener on iOS. I was even more curious as to whether there were even better ways to blog with it on the go, since iOS hardware is so damn portable.

Luckily there is, and I wanted to share it with the folks that may not know.

A little help from the iOS app ecosystem…

Out of the box, Scrivener doesn’t export text to blogs and it shouldn’t. That’s not its core purpose. For me at least, this omission of functionality wasn’t a let down. The good news though, is that there are plenty of apps out there that can pick up the slack in this regard and the one that did this best for me was an app called Workflow.

Now Workflow could merit its own post worth thousands of words alone. I’ll save you the geeked-out deep-dive though and simply say that, as its name suggests, Workflow is a universal iOS app that provides automated workflows for you on your iOS devices. It can accomplish a shocking amount tasks without a jailbreak and one of those tasks is exporting text from any iOS app to your WordPress blog via an action extension.

Keeping it simple so you can get back to blogging…

Instead of walking you through the process of how to create this workflow within the app, the kind developers of Workflow allow you to share your workflows via URL schemes. So all you should have to do is buy the app (on sale right now at a steal for $2.99 USD) and click this link here to install the workflow I created for you all, automagically! After the workflow shows up in the Workflow app, all you have to do hook up your blog to the workflow (by providing your login credentials) and tweak the settings within the workflow to taste.

I personally have mine setup to output to draft mode, allowing me to manually add a title and categories/tags before publishing live on my site. You can set it to however you like though.

Also, for all of you markdown lovers, I have set this workflow up to create markdown from rich text! So get on up and get your MD on!

“Sounds great! Got it all installed. How do I use it though?”

Once you have everything setup the way you like, all you have to do in Scrivener is simply write your post. Once that’s complete do the following:

  1. Highlight all of your text and copy it. Then tap the “Share” option.
  2. On the share sheet that pops up, look at the action extensions (bottom row) and look for the option to “Run Workflow”. This will then bring up the Workflow automations you currently have, one of which will be the Workflow you got from this post. Protip: If “Run Workflow” isn’t showing up, scroll all the way to the right of that row. Tap more. And add that option from the list that shows up of available actions.
  3. Just tap that, fill out any field prompts, and let Workflow do its thing!
  4. Once the workflow finishes, log into your site and verify everything is published as expected.
  5. Enjoy more blogging from your favorite writing app on the go!

That’s it! If you have the official iOS app for WordPress you can actually blog completely desktop free from any iOS device at your disposal! Pretty awesome right?!

So, from the top, here’s what you need to make this all work:
  • A phone or tablet the runs iOS.
  • Scrivener for iOS (though, this Workflow can work with ANY text editor on iOS).
  • Workflow (it’s universal so you just buy it once and it works on iPad or iPhone. Workflows will sync between the two devices as well.)
  • WordPress for iOS (if you want to not think about blogging on a desktop again.)

Tips: Getting Your Markdown in Scrivener to Display Quicker in Marked…

Hey everyone! Just a quick and easy tip for all of you folks who use Marked as your Markdown previewer when writing in Scrivener.

One of the microscopic issues I have with using Marked in conjunction with Scrivener is the lag between when you write your Markdown (or any text) in Scrivener, it autosaves, and a few seconds later it shows up in Marked. This isn’t a bug in either programs – Marked shows what your document looks like after it is saved, and Scrivener autosaves after a preset amount of time after you stop typing (usually a matter of seconds).

I know, I know, not a big deal. But did you know that you can change the amount of time it takes for Scrivener to autosave? You can! It’s in the preference pane. Open up Scrivener, head to into the preferences menu and click the general tab, you’ll find in there.

ScrivPrefPaneShot

You can go as low as 1 second (I tried 0.5 seconds, no dice) in this field. Set it to that and close out of preferences. You should see a bit of an improvement to when Marked displays your Markdown now. It doesn’t get rid of the lag completely, but it does make it much less noticeable, creating a more seamless experience between apps.

So if it’s been distracting you or worse, keeping you from pairing these two juggernaut apps, try tweaking this auto-save time increment lower and see if that makes the experience any better for you. I know it did for me.

Writing: Marked and Scrivener Revisited…

Hey all! This will be a short one. A few posts ago I had a write up about an Alfred workflow I wrote that opened your Scrivener .proj files in both Scrivener and Marked simultaneously.

After I published that post, many of you pointed out (including Marked’s very own Twitter account) that with the right preferences checked off, simply dragging and dropping your Scrivener project file into Marked should accomplish the same result. I totally agreed with this sentiment, but I apparently found a bug that was preventing me from doing so: dragging a Scrivener project file to Marked in the dock did in fact open both Scrivener and Marked but, for me anyways, Scrivener the app would open but the project wouldn’t. Long story short, I detailed the issue to the Marked account on Twitter and was assured that the bug would be fixed in a future release of Marked.

Well, today Brett Terpstra (Marked’s developer) announced the release of version 2.3 of his software and, true to his word, the issue has been resolved! So, if you own Marked and didn’t want to pony up for the Powerpack that Alfred offers, you once again can drag and drop Scrivener project files into Marked on your dock. Both apps will open simultaneously with your cursor blinking in Scrivener; waiting patiently for any Markdown you want to throw at it.

Scriv2Marked

Much, much gratitude for the fix and the prompt response when I brought it up!

If you create content in markdown in Scrivener and don’t use Marked? You are absolutely missing out. I whole-heartedly recommend it. It’s worth your hard-earned cash and I am not ashamed at all to admit that I don’t even come close to utilizing all that it can do. I use it daily and can’t imagine writing for the web without it. It’s grown with me and my ever-changing workflows .

I am betting it will do the same for you.

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: