You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.
I've found that pandoc does a surprisingly good job of converting Google Docs documents with complicated tables, headings, bullet lists, etc. into reasonable-looking Markdown files (with a few formatting issues that can be cleaned up via a script or via markdown linting) if you use the Github-flavored markdown output format and convert from docx. For example:
I'd like to implement a --markdown flag in gitdriver that would download the Google Doc using docx mime type, then include an extra step of converting to Github-flavored markdown using pandoc and cleaning up the intermediate docx file. Is that something you'd be interested in adding?
Pro: Your users would now have markdown as an output format option
Con: Some of the inevitable formatting issues that occur when going from docx to markdown may surprise users (violating principle of least-surprise). But warning the user should take care of this.
As an example of the kind of formatting issues I'm referring to:
If there is a line with bold text, and it ends in a space, the space is not ignored, so you end up with the following (invalid) attempt at making the text in the Markdown file bold:
**This is some bold text. **
which does not render correctly in Markdown:
**This is some bold text. **
Bullet list items that span multiple lines have blockquote > in front of them, e.g.,
Inventore sit non voluptas quidem. Aut nobis fuga facilis rerum et nisi cupiditate ut. Quod quisquam deserunt et ipsum aut velit et numquam. Nihil ab dolorem molestiae dolore voluptate. Et aut ea veritatis velit ipsa repellendus.
Architecto repudiandae eius sunt ipsa. Quos non dicta id nihil quaerat veniam est sed. Illum laboriosam accusantium dolores totam fugiat animi iusto nihil. Facilis dolores libero mollitia impedit minus iste.
Those are the main two I noticed, there may be a few others but they're minor by comparison.
The text was updated successfully, but these errors were encountered:
On Sun, May 06, 2018 at 12:59:55AM +0000, Chaz Reid wrote:
I'd like to implement a `--markdown` flag in gitdriver that would
download the Google Doc using docx mime type, then include an extra
step of converting to Github-flavored markdown using pandoc and
cleaning up the intermediate docx file. Is that something you'd be
interested in adding?
Sure, that sounds like an interesting feature. I'd be happy to accept
a pull request that implements it.
I've found that pandoc does a surprisingly good job of converting Google Docs documents with complicated tables, headings, bullet lists, etc. into reasonable-looking Markdown files (with a few formatting issues that can be cleaned up via a script or via markdown linting) if you use the Github-flavored markdown output format and convert from docx. For example:
I'd like to implement a
--markdown
flag in gitdriver that would download the Google Doc using docx mime type, then include an extra step of converting to Github-flavored markdown using pandoc and cleaning up the intermediate docx file. Is that something you'd be interested in adding?Pro: Your users would now have markdown as an output format option
Con: Some of the inevitable formatting issues that occur when going from docx to markdown may surprise users (violating principle of least-surprise). But warning the user should take care of this.
As an example of the kind of formatting issues I'm referring to:
If there is a line with bold text, and it ends in a space, the space is not ignored, so you end up with the following (invalid) attempt at making the text in the Markdown file bold:
which does not render correctly in Markdown:
**This is some bold text. **
Bullet list items that span multiple lines have blockquote
>
in front of them, e.g.,Those are the main two I noticed, there may be a few others but they're minor by comparison.
The text was updated successfully, but these errors were encountered: