Share a Google document with this daemon, and it will be converted to JSON, saved to disk and watched for changes.
- Google Sheets are converted using the XLSX export.
- Google Docs are converted using ArchieML
Inspired by DriveShaft and gudocs.
$ npm install -g google-drive-sync
$ google-drive-sync \
--out-dir /usr/share/nginx/html/gdrive \
--credentials ~/.google-credentials.json \
--daemonize /var/log/gdrive-sync.log \
--state /var/lib/misc/gdrive-sync.json
Can e.g. be used to purge HTTP caches.
$ cat my-plugin.js
module.exports = function (googleDriveSync) {
googleDriveSync.on('error', err => console.log('my plugin', err));
googleDriveSync.on('saved', fileName => console.log('document was saved', fileName));
}
$ google-drive-sync --plugins ./my-plugin.js [...]
$ DEBUG=google-drive-sync:* google-drive-sync [...]