From 95f331199b053a695757b2f3e6f5300820d6fc8d Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 21 Jul 2018 15:57:13 +0200 Subject: [PATCH] improve/create documentation --- README.md | 23 +++++++++++++++++++++++ drive-download | 4 +++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..246a354 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Download unseen files from a folder in Google Drive +Example: +~~~ +cd ~/Documents +drive-download scanbot +~~~ + +The script only downloads files it hasn't seen before. + +## Configuring +1. Get Google Drive API id and secret from the Google API console. +2. Create and edit `.config/drive-download/settings.yaml`: + +~~~ +client_config_backend: settings +client_config: + client_id: XXX.apps.googleusercontent.com + client_secret: _s3cr3deadc4fef00baR + + save_credentials: True + save_credentials_backend: file + save_credentials_file: /home/USERNAME/.cache/drive-download/credentials.json +~~~ diff --git a/drive-download b/drive-download index 73f75a5..bf3b0d8 100755 --- a/drive-download +++ b/drive-download @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# Download unseen files from a folder in Google Drive import sys if sys.version_info < (3, 3): @@ -39,7 +40,8 @@ def folder_id(folder_name): def main(): global seen, drive - parser = argparse.ArgumentParser(description='Download files from a folder in Google Drive') + parser = argparse.ArgumentParser( + description='Download unseen files from a folder in Google Drive') parser.add_argument('folder', type=str, help='folder to download from') args = parser.parse_args()