5.0.0 • Published 2 months ago

google-drive-sync v5.0.0

Weekly downloads
1
License
BSD-3-Clause
Repository
github
Last release
2 months ago

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

With local file system:

$ 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

With S3:

$ google-drive-sync \
  --out-dir data/ \
  --credentials ~/.google-credentials.json \
  --daemonize /var/log/gdrive-sync.log \
  --state state.json
  --s3 https://access-key-id:secret-key@s3.amazonaws.com/google-drive-sync?log=true&http.timeout=20000

Ignoring errors from Google Drive

Sometimes Google Drive returns errors that are not fatal, e.g. 429 (rate limit) and 403 (forbidden). You can ignore these errors by passing the --ignore-errors option. By default, only 429 errors are ignored

$ google-drive-sync --ignore-errors 429 --ignore-errors 403

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 [...]
5.0.0

2 months ago

5.0.0-beta.1

2 months ago

4.2.1

4 months ago

4.2.0

4 months ago

4.1.1

2 years ago

4.1.0

4 years ago

4.0.4

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

4.0.0-alpha.7

4 years ago

4.0.0-alpha.5

4 years ago

4.0.0-alpha.6

4 years ago

4.0.0-alpha.3

4 years ago

4.0.0-alpha.4

4 years ago

4.0.0-alpha.2

4 years ago

4.0.0-alpha.1

4 years ago

4.0.0-alpha.0

4 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.5

5 years ago

1.1.4

6 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.11

7 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago