Skip to content
Merged
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
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ gdocs2md
A simple Google Apps script to convert a properly formatted Google Drive Document to the markdown (.md) format.

## Usage
Running the script:

* 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 (once per doc):
* Open your Google Docs document
* Tools > Script editor
* Delete the default empty function myFunction() and paste the contents of the `converttomarkdown.gapps` file into the code editor
* File > Save

* 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 (run as many times as you want):
* Tools > Script editor
* Select the code file with the `ConvertToMarkdown` function
* In the taskbar, click "Select function" and select `ConvertToMarkdown`
* Click the Run button (first run will require you to authorize it)
* Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]..."

## Interpreted formats
* Text:
Expand Down
17 changes: 10 additions & 7 deletions converttomarkdown.gapps
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*
Usage:
Adding this script to your doc:
- Tools > Script Manager > New
- Select "Blank Project", then paste this code in and save.
Adding this script to your doc:
- Open your Google Docs document
- Tools > Script editor
- Delete the default empty function myFunction() and paste the contents of this file into the code editor
- Save
Running the script:
- Tools > Script Manager
- Select "ConvertToMarkdown" function.
- Click Run button.
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]...".
- Tools > Script editor
- Select the code file with the "ConvertToMarkdown" function
- In the taskbar, click "Select function" and select "ConvertToMarkdown"
- Click the Run button (first run will require you to authorize it)
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]..."
*/

function ConvertToMarkdown() {
Expand Down