https://github.com/automattic/google-docs-add-on
Publish to WordPress from Google Docs
https://github.com/automattic/google-docs-add-on
google-apps-script google-docs wordpress wordpress-api
Last synced: 2 months ago
JSON representation
Publish to WordPress from Google Docs
- Host: GitHub
- URL: https://github.com/automattic/google-docs-add-on
- Owner: Automattic
- License: gpl-3.0
- Created: 2016-11-23T17:11:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T01:51:26.000Z (about 2 years ago)
- Last Synced: 2025-01-30T01:03:49.093Z (3 months ago)
- Topics: google-apps-script, google-docs, wordpress, wordpress-api
- Language: JavaScript
- Homepage:
- Size: 1.19 MB
- Stars: 164
- Watchers: 15
- Forks: 21
- Open Issues: 63
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Getting started
The add-on lives in Google's Script Editor but, in keeping with [best practices](https://developers.googleblog.com/2015/12/advanced-development-process-with-apps.html),
this repo is the source of truth, and the script editor will be overwritten with
local changes.# Configuring
This process needs to be performed once:
1. `npm install` to install all dependencies
5. Create a new apps script here: https://script.google.com
6. Get the script ID from the URL (everything between the `/d/` and `/edit` - `script.google.com/a/google.com/d/SCRIPT_ID_HERE/edit`)
2. Install [`clasp`](https://developers.google.com/apps-script/guides/clasp)
7. ``
8. Create a new [WordPress.com App](https://developer.wordpress.com/apps/new/):
1. Set the redirect URL to be `https://script.google.com/macros/d/SCRIPT_ID/usercallback`
2. Make a note of the app client ID and client secret
9. In the app script, go to `File` and `Project Properties`
1. Select the `Script properties` tab
2. Add `OauthClientId` and set the value to your app
3. Add `OauthClientSecret` and set the value to your appEverything is now setup.
# Deploying
`npm run deploy`
This will use node-google-apps-script to upload the `src` directory to the
add-on's script editor.# Testing
In the script editor choose "Publish" → "Test as add-on…" and then select a
document to test with.That will open a new window with your document. You will then see your project
in the Add-ons menu.