From 548ea362f319cd1f7fcbad0344fde8449fa14255 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Wed, 13 Nov 2019 01:04:29 +0300 Subject: [PATCH] Update client_id and client_secret -> maybe Google will verify it? --- CMakeLists.txt | 2 +- README.md | 47 +++++++++++++-------------------- grive/src/main.cc | 4 +-- libgrive/src/protocol/OAuth2.cc | 7 +---- 4 files changed, 22 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 951d874..1b3f9a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8) include(GNUInstallDirs) # Grive version. remember to update it for every new release! -set( GRIVE_VERSION "0.5.1-dev" ) +set( GRIVE_VERSION "0.5.1" ) # common compile options add_definitions( -DVERSION="${GRIVE_VERSION}" ) diff --git a/README.md b/README.md index eef78e6..ff3cb4f 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,14 @@ -# ACHTUNG +# Grive2 0.5.2-dev -Most of Google Drive APIs are currently locked. R.I.P grive2 and other opensource -Google Drive clients :) - -Details: - -Here https://developers.google.com/drive/api/v3/about-auth?hl=ru most APIs are marked as restricted - -And here https://support.google.com/cloud/answer/9110914 they say that - -**The following application types are examples of apps that are no longer allowed per the Permitted Application Types policy: -Apps that store or backup data other than email messages in Gmail.** - -So, go tell Google they're morons and quit using google drive NOW :) - -# Grive2 0.5.1-dev - -28 Sep 2016, Vitaliy Filippov +13 Nov 2019, Vitaliy Filippov http://yourcmc.ru/wiki/Grive2 This is the fork of original "Grive" (https://github.com/Grive/grive) Google Drive client with the support for the new Drive REST API and partial sync. -Grive can be considered still beta or pre-beta quality. It simply downloads all the files in your -Google Drive into the current directory. After you make some changes to the local files, run +Grive simply downloads all the files in your Google Drive into the current directory. +After you make some changes to the local files, run grive again and it will upload your changes back to your Google Drive. New files created locally or in Google Drive will be uploaded or downloaded respectively. Deleted files will also be "removed". Currently Grive will NOT destroy any of your files: it will only move the files to a @@ -32,12 +16,12 @@ directory named .trash or put them in the Google Drive trash. You can always rec There are a few things that Grive does not do at the moment: - continously wait for changes in file system or in Google Drive to occur and upload. - A sync is only performed when you run Grive (there are workarounds for almost + A sync is only performed when you run Grive (there are workarounds for almost continuous sync. See below). - symbolic links support. - support for Google documents. -These may be added in the future, possibly the next release. +These may be added in the future. Enjoy! @@ -177,17 +161,22 @@ Grive uses cmake to build. Basic install sequence is ## Version History -### Grive2 v0.5.1-dev +### Grive2 v0.5.2-dev -- support for .griveignore -- automatic sync solution based on inotify-tools and systemd +### Grive2 v0.5.1 + +- Support for .griveignore +- Automatic sync solution based on inotify-tools and systemd - no-remote-new and upload-only modes -- ignore regexp does not persist anymore (note that Grive will still track it to not +- Ignore regexp does not persist anymore (note that Grive will still track it to not accidentally delete remote files when changing ignore regexp) -- added options to limit upload and download speed -- faster upload of new and changed files. now Grive uploads files without first calculating +- Added options to limit upload and download speed +- Faster upload of new and changed files. Now Grive uploads files without first calculating md5 checksum when file is created locally or when its size changes. -- added -P/--progress-bar option to print ASCII progress bar for each processed file (pull request by @svartkanin) +- Added -P/--progress-bar option to print ASCII progress bar for each processed file (pull request by @svartkanin) +- Added command-line options to specify your own client_id and client_secret +- Now grive2 skips links, sockets, fifos and other unusual files +- Various small build fixes ### Grive2 v0.5 diff --git a/grive/src/main.cc b/grive/src/main.cc index 7f0bd33..31a2b07 100644 --- a/grive/src/main.cc +++ b/grive/src/main.cc @@ -46,8 +46,8 @@ #include #include -const std::string default_id = "22314510474.apps.googleusercontent.com" ; -const std::string default_secret = "bl4ufi89h-9MkFlypcI7R785" ; +const std::string default_id = "615557989097-i93d4d1ojpen0m0dso18ldr6orjkidgf.apps.googleusercontent.com" ; +const std::string default_secret = "xiM8Apu_WuRRdheNelJcNtOD" ; using namespace gr ; namespace po = boost::program_options; diff --git a/libgrive/src/protocol/OAuth2.cc b/libgrive/src/protocol/OAuth2.cc index 73ae088..db1858a 100644 --- a/libgrive/src/protocol/OAuth2.cc +++ b/libgrive/src/protocol/OAuth2.cc @@ -84,12 +84,7 @@ void OAuth2::Auth( const std::string& auth_code ) std::string OAuth2::MakeAuthURL() { return "https://accounts.google.com/o/oauth2/auth" - "?scope=" + - m_agent->Escape( "https://www.googleapis.com/auth/userinfo.email" ) + "+" + - m_agent->Escape( "https://www.googleapis.com/auth/userinfo.profile" ) + "+" + - m_agent->Escape( "https://docs.google.com/feeds/" ) + "+" + - m_agent->Escape( "https://docs.googleusercontent.com/" ) + "+" + - m_agent->Escape( "https://spreadsheets.google.com/feeds/" ) + + "?scope=" + m_agent->Escape( "https://www.googleapis.com/auth/drive" ) + "&redirect_uri=urn:ietf:wg:oauth:2.0:oob" "&response_type=code" "&client_id=" + m_client_id ;