This Script Converts Google Documents To Markdown For Easy Exporting

This Script Converts Google Documents To Markdown For Easy Exporting

We’ve shown you the wonders of Markdown as great for your to-do lists and notes. If you love Markdown too, but you’re stuck with a bunch of Google docs that aren’t in the format (but need to be), this Google Apps Script converts them instantly.

The script, available at GitHub by Renato Mangini, is easy to use, works like a charm, and you can save it in Google Drive so you can use it over and over, anytime you need to convert a document to Markdown. You can grab it at the link below, but here’s how to “install” it in Google Documents:

  1. Open Google Drive in a browser and open any document.
  2. Click the Tools menu, then select Script Editor.
  3. Click Close on the pop-up tutorial window, and delete the starter text.
  4. Open Renato’s script in another tab, and copy the contents. Paste them into the script editor.
  5. Click File and Save to save the script. Give it a name, like “ConvertToMarkdown”.

Now your script is saved, and you can run it anytime you like. To run it against a Google Document, just open that document, click Tools, then select “Script Manager”. You’ll see your script in the list. Select it, and then click “Run”.

That’s all there is to it. The script is especially useful if you’re looking to export Google Documents in a format that can easily be imported somewhere else (like GitHub, for example) or converted into another format (like HTML) later. Hit the link below to grab the script yourself and read more about which formats it’s able to interpret and convert. gdocs2md [GitHub via Hacker News]


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments