asciidoc-googledocs-addon
asciidoc-googledocs-addon copied to clipboard
Export Google Docs as AsciiDoc
= AsciiDoc Processor Add-on for Google Docs™ Guillaume Grossetie :webstore: https://gsuite.google.com/marketplace/app/asciidoc_processor/1023004302050
Convert your Google Docs™ into AsciiDoc.
image::https://ssl.gstatic.com/apps/additnow/images/hedgehog_light_logo_1x.png[link="{webstore}"]
== Usage
- Install extension from {webstore}[Google Workspace Marketplace]
- Open a document or create a new one
- Under the Add-ons menu, click AsciiDoc Processor > Convert all to convert the entire document into AsciiDoc.
- Copy and paste the AsciiDoc output anywhere you want!
NOTE: To convert a part of your document, select some text and click AsciiDoc Processor > Convert selection
== Supported text formats
This Add-on supports the following text formats :
- Headings
- Bold, italic, underline, subscript, superscript
- Tables
- Code bloc
- Lists (unordered and ordered)
== Development
As a Google Apps add-on, this project is written in JavaScript and HTML. The file app/Code.gs
contains the JavaScript functions; app/Dialog.html
is the template for calling the conversion functions and displaying the processed output.
=== Testing unpublished code
To safely test the code in your own Google Apps environment, create a new Google Apps project out of these files -- or your modified versions! -- then create and run test deployments using these simple steps.
. Inside a Google Doc, select Tools > Script editor....
- A new tab will open for a blank project, with a
Code.gs
file already started.
. In the new tab, give your project a name, such as asciidoc-googledocs-addon-test
, and click "Ok".
. Replace the entire body of Code.gs
with the contents of app/Code.gs
, and save.
. In the page menu, select File > New > HTML file.
. In the Create dialog, enter the filename Dialog.html
, then "Ok".
. Replace the entire body of Dialog.html
with the contents of app/Dialog.html
, and save.
. In the page menu, select Publish > Test as addon.
. Under "Installation Config", select "Installed and Enabled".
. Click "Select Doc" and choose a Google Doc from your Drive.
. Under "Execute Saved Test", select the radio button to the left of your new test, then click "Test".
- This will open your document in a new tab; your new test addon will be listed under Add-ons!
== Help
If you discover errors or ommisions in the source code or documentation, please don't hesitate to https://github.com/Mogztter/asciidoc-googledocs-addon/issues[submit an issue or open a pull request with a fix].