Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
gdocs2md
========

A simple Google Apps script to convert a properly formatted Google Drive Document to the markdown (.md) format.
A derivate of a simple Google Apps script forked originally from https://github.com/mangini/gdocs2md to convert an appropriately formatted Google Drive Document to as OU-XML.

## Usage

* Adding this script to your doc (once per doc):
* Open your Google Drive document (http://drive.google.com)
* Tools -> Script Manager > New
* Select "Blank Project", then paste this code in and save.
* Clear the myFunction() default empty function and paste the contents of [converttomarkdown.gapps](https://raw.github.com/mangini/gdocs2md/master/converttomarkdown.gapps) into the code editor
* File -> Save

* Adding this script to your doc:
* Tools > Script Editor > New
* Select "Blank Project"
* Clear the example code and paste in the contents of [converttoOUXML.gapps](https://raw.github.com/psychemedia/gdocs2md/master/converttoOUXML.gapps)
* Create a new HTML file called *metadata* and copy and paste in the contents of *metadata.html*
* Save with an appropriate project name, eg *md exporter*
* Reload the original doc

* Running the script (run as many times as you want):
- Tools > Script Manager
- Select "ConvertToMarkdown" function.
- Click Run button (First run will require you to authorize it. Authorize and run again)
- Converted doc with images attached will be emailed to you. Subject will be "[MARKDOWN_MAKER]...".
* Running the script (first run of each function will require you to authorize it):
* In the Add-Ons menu, find the new menu eg "gdoc2OUXML"
* Select "Metadata" to open a form that allows you to set various metadata properties that are either required or expected in the OUXML
* Select "Email OUXML" to email markdown doc and saved images to yourself
* Converted doc with images attached will be mailed to you. Subject will be "[OUXML_MAKER]..."
* Select "Save OUXML to GDrive" to save markdown doc and images to your Google Drive
* A new folder with same name as original doc will be created containing the OUXML document and image files
* Select "Save OUXML to GDrive (zip)" to save a zip file containing the XML and any images in one bundle. The zip file will be saves to the top level of your Google Drive account.



## Interpreted formats
Expand Down Expand Up @@ -47,17 +52,18 @@ A simple Google Apps script to convert a properly formatted Google Drive Documen
* Renato Mangini - [G+](//google.com/+renatomangini) - [Github](//github.com/mangini)
* Ed Bacher - [G+](//plus.google.com/106923847899206957842) - [Github](//github.com/evbacher)

* Tony Hirst - [Github](//github.com/psychemedia)

## LICENSE

Use this script at your will, on any document you want and for any purpose, commercial or not.
The MarkDown files generated by this script are not considered derivative work and
don't require any attribution to the owners of this script.

If you want to modify and redistribute the script (not the converted documents - those are yours),
just keep a reference to this repo or to the license info below:
If you want to modify and redistribute the script (not the converted documents - those are yours), just keep a reference to this repo or to the license info below:

```
Copyright 2013 Google Inc. All Rights Reserved.
Original content: Copyright 2013 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading