2.1.2 • Published 3 months ago

@abetomo/google-drive-cleaner v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

google-drive-cleaner

npm version Test

A tool to remove files on Google Drive.

install

% npm install @abetomo/google-drive-cleaner

dryrun

example

  • Owner is GMAIL_ADDRESS
  • File name contains .xlsx
% google-drive-cleaner \
-a AUTH_JSON_FILE_PATH \
-q "'GMAIL_ADDRESS' in owners and name contains '.xlsx'"

Because it is dryrun, the file to be deleted is only displayed.

query

See Search query terms and operators for queries specified with -q.

delete

Add --no-dryrun option.

example

  • Owner is GMAIL_ADDRESS
  • File name contains .xlsx
% google-drive-cleaner \
-a AUTH_JSON_FILE_PATH \
-q "'GMAIL_ADDRESS' in owners and name contains '.xlsx'" \
--no-dryrun

By adding the --no-dryrun option, the files on the drive are deleted.

Usage example of Node.js API

'use strict'

const GoogleDriveCleaner = require('@abetomo/google-drive-cleaner')
const googleDriveCleaner = new GoogleDriveCleaner('AUTH_JSON_FILE_PATH')
googleDriveCleaner.clean({
  query: 'Query string for searching delete files.',
  dryrun: true
})

AUTH_JSON_FILE_PATH

Use GCP service account credentials. You first need to create a service account, download its json key.

2.1.2

3 months ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.8

2 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago