Docs to WordPress
Contributors: wpdavis, anubisthejackle
Donate link: http://wpdavis.com/
Tags: docs,google,google docs,syndication
Requires at least: 3.7
Tested up to: 4.1.1
Stable tag: 1.1
Easily move posts from Google Docs to WordPress
Description
This plugin will grab docs out of a collection in Google Docs, create or update a post in WordPress and then move the doc to a new collection. Google Docs no longer supports xmlrpc, so this is perhaps the easiest way to move content from your Google Docs account to your self-hosted WordPress install.
You can see more details at http://dev.bangordailynews.com/2011/06/16/marrying-google-docs-and-wordpress-or-really-any-cms/
Installation
- Upload
docs-to-wordpress
to the/wp-content/plugins/
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Create a Google App for your website.
- Enter Client ID and Client Secret into settings page.
- You should be redirected to a Google login page. Grant full permissions.
- If you wish, activate the extender plugin that removes formatting from Google Docs and removes comments, placing them in a separate meta box
- To run the plugin, you will need to either activate the included Cron Extender or put code in a separate file and point a cron job to it.
Tara Kerwin has made a helpful installation walkthrough video available at https://youtu.be/oFLjn2VOn-U
To run using WP CRON
Activate the cron extender.
To run using real cron
Create a file to run cron against, and put the following code in it:
<?php
include('./wp-load.php');
$docs_to_wp = new Docs_To_WP();
$results = $docs_to_wp->startTransfer();
You will need to have a folder to draw the docs from and an optional folder to put the docs in after they've been processed.
First create the folder that you want to store unpublished docs in. This is your "Origin" folder. Next create the folder that you will move converted files to. This is the "Target" folder. If you're using Cron, you're going to want to write stories in a separate folder, and then move them to the Origin folder for publishing, when they're ready.
Changelog
1.1
Version bump. Removes anonymous functions, so it can be used as far back as PHP 5.2
1.0-beta
Update to remove deprecated Google API and use Drive API v2 Updates to code to clean it up, remove extraneous loops. Added Options page. Changes to make it easier to use.
0.4-beta
Use HTTPS instead of HTTP, per new Google API spec.
Fix a few bugs with carrying over bold and italic
0.3-beta
In extend-clean.php, extract the styles and apply them so bolding and italicizing goes through. Also, don't strip heading styles. Props nacin and Rob Flaherty.
0.2-beta
Added the cron extender
0.1-beta
Initial release