Skip to content

Commit d26d900

Browse files
committed
Update README.md
1 parent 7637168 commit d26d900

File tree

1 file changed

+35
-17
lines changed

1 file changed

+35
-17
lines changed

README.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,49 @@ gdocs2md
44
A simple Google Apps script to convert a properly formatted Google Drive Document to the markdown (.md) format.
55

66
## Usage
7-
* Open your Google Drive document (http://drive.google.com)
8-
* Tools -> Script Editor. Ignore (close) if you see a popup, clear the myFunction() default empty function and paste the [converttomarkdown.gapps](https://raw.github.com/mangini/gdocs2md/master/converttomarkdown.gapps) contents into the code editor
9-
* File -> Save
10-
* Run -> ConvertToMarkdown (First run will require you to authorize it. Authorize and run again)
117

12-
The converted Markdown will be immediately sent as an attachment to your email. Images will be attached as well.
13-
14-
You can run the script again in the same document whenever you want, just clicking in Tools -> Script Manager -> Run. Every run will send a new email.
8+
* Adding this script to your doc (once per doc):
9+
* Open your Google Drive document (http://drive.google.com)
10+
* Tools -> Script Manager > New
11+
* Select "Blank Project", then paste this code in and save.
12+
* 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
13+
* File -> Save
14+
15+
* Running the script (run as many times as you want):
16+
- Tools > Script Manager
17+
- Select "ConvertToMarkdown" function.
18+
- Click Run button (First run will require you to authorize it. Authorize and run again)
19+
- Converted doc with images attached will be emailed to you. Subject will be "[MARKDOWN_MAKER]...".
1520

1621

1722
## Interpreted formats
18-
* *NEW*: Numbered lists are converted correctly now, including nested lists
19-
* *NEW*: images are correctly extracted and sent as attachments
20-
* *NEW*: Table of contents is replaced by `[[TOC]]`
21-
* paragraphs are separated by two newlines
22-
* text styled as heading 1, 2, 3, etc is converted to Markdown heading: #, ##, ###, etc
23-
* text formatted with Courier New is backquoted: ``text``
24-
* links are converted to MD format: `[anchortext](url)`
25-
* bullet lists are converted to "`*`" MD format appropriately, including nested lists
26-
* blocks of text delimited by "--- class whateverclassnameyouwant" and "---" are converted to `<div class="whateverclassnameyouwant"></div>`
27-
* blocks of text delimited by "--- source code" and "---" are converted to `<pre></pre>` and prefixed by 4 empty spaces
23+
* Text:
24+
* paragraphs are separated by two newlines
25+
* text styled as heading 1, 2, 3, etc is converted to Markdown heading: #, ##, ###, etc
26+
* text formatted with Courier New is backquoted: ``text``
27+
* links are converted to MD format: `[anchortext](url)`
28+
* Lists:
29+
* Numbered lists are converted correctly, including nested lists
30+
* bullet lists are converted to "`*`" Markdown format appropriately, including nested lists
31+
* Images:
32+
* images are correctly extracted and sent as attachments
33+
* Blocks:
34+
* Table of contents is replaced by `[[TOC]]`
35+
* blocks of text delimited by "--- class whateverclassnameyouwant" and "---" are converted to `<div class="whateverclassnameyouwant"></div>`
36+
* Source code:
37+
* **UPDATED**: blocks of text delimited by "--- source code" or "--- src" and "---" are converted to `<pre></pre>`
38+
* **NEW**: blocks of text delimited by "--- source pretty" or "--- srcp" and "---" are converted to `<pre class="prettyprint"></pre>`
39+
* Tables:
40+
* **NEW**: Simple `<table>` processing
2841
* "--- jsperf `<testID>`" is replaced by an iframe that shows an interactive chart of a JSPerf test. The `<testID>` is the last part of the URL of the Browserscope anchor in your JSPerf test. Something like `"agt1YS1wcm9maWxlcnINCxIEVGVzdBjlm_EQDA"` in the URL `http://www.browserscope.org/user/tests/table/agt1YS1wcm9maWxlcnINCxIEVGVzdBjlm_EQDA`
2942

3043

3144

45+
## CONTRIBUTORS
46+
47+
* Renato Mangini - [G+](//google.com/+renatomangini) - [Github](//github.com/mangini)
48+
* Ed Bacher - [G+](//plus.google.com/106923847899206957842)
49+
3250
## LICENSE
3351

3452
Use this script at your will, on any document you want and for any purpose, commercial or not.

0 commit comments

Comments
 (0)