Skip to content

Share your Google Drive files with this daemon to have them synced to disk as JSON.

License

Notifications You must be signed in to change notification settings

anderser/google-drive-sync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-drive-sync

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.

Installation

$ npm install -g google-drive-sync

Usage

$ 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

Plugins

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 logging


$ DEBUG=google-drive-sync:* google-drive-sync [...]

About

Share your Google Drive files with this daemon to have them synced to disk as JSON.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%