Google Documents to AsciiDoc

asciidoc
Max Rydahl Andersen

I was looking for a way to convert Google documents to AsciiDoc.

In that search I learned about AsciiDoc Processor which "kind of" works, but have two big issues: I cannot use it on
my Google Apps domain that do no allow Google Add Ons and it did not handle images nor tables.

Thus I started looking for another solution.

Here I found gdocs2md which
converts to MarkDown which is close enough and it was just a script I
could use on Google App Domain. Even more awesome is that it supports
basic tables and images. It still had some issues but I noticed this
project has a tons of pull
requests
and that lead me to
jacksonicson/gdocs2md which
fixes a tons of the bugs.

After a bit of figuring out the logic I modified and extended this to
convert to AsciiDoc instead of markdown.

The result is gdoc2adoc.

asciidoc

With this you just put in this code into your script editor and run
the conversion via the now added AsciiDoc menu.

The result can either be mailed to you as a zip or created as a <original name>.adoc folder in you google drive.

You can see details on how to use it in the README.

I’ve been using it on a bunch of documents and found it useful.

Now sharing it with the world and if you find documents that is not converted well do open an issue or even better a pull request.

Enjoy!