Giter Club home page Giter Club logo

cloud_storage's Introduction

WFX plugin for popular cloud file storages.

This is analog for the Ghisler's "Cloud" plugin, designed to work with popular cloud storages, like Google Drive, Dropbox etc. This plugin allows you:

  • Create several accounts for service
  • Navigate and manipulate your files on remote storage
  • Upload/download files, export google docs to local file system
  • Work with removed files in trash
  • Use OAuth2 authorization
  • Create and use your own authorization apps
  • Use some service specific features in command line

For now you can work with the following services: Google Drive, Dropbox, Yandex Disk.

Installation

You can get latest release and install it in "Options" window as WFX plugin. Or you can buld it from code

sudo apt-get install g++ libssl-dev
git clone https://github.com/ivanenko/cloud_storage.git
cd cloud_storage
mkdir cmake-build-release
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release . -Bcmake-build-release
cmake --build cmake-build-release --target cloud_storage -- -j 2

Use cloud_storage.wfx file in cmake-build-release folder

Security

Account passwords are never used and stored. We use OAuth2 tokens instead. Tokens are not saved by default, and you need to authorize everytime you enter your storage. You can change settings for your account and save token in config file (not secure), or in DC password manager.

You can also create your own authorization apps, get its client_id and use it for granting access to your files. Read more about creating app for dropbox here, or on this wiki page for all used services. Save your applications client_id in 'Connection settings' window, 'OAuth setting' tab.

Service specific features

Every service provide specific and unique commands. It could be download files from internet directly to your storage, or export google document in different formats. You can read more about this on wiki page

Contribute

If you want to add new service - check this wiki page

cloud_storage's People

Contributors

ivanenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

j2969719 dhmike57

cloud_storage's Issues

Please compile a fresh binary using Openssl 1.1

On 64-bit linux the plugin works well on Dropbox, Google Drive and Yandex Disk, thank you.

I downloaded the binary, and it demands libssl.so.1.0.0 and libcrypto.so.1.0.0 from Openssl 1.0.

Please compile a fresh binary using Openssl 1.1.

EClassNotFound: Class "TRadioGroup" not found

I have created the cloud_storage.wfx and tried to create a connection...
After I added the name of the connection:

--------------- 17-11-2020, 23:08:19 ---------------
| DC v0.8.2 beta Rev. 8010 -- x86_64-Linux-gtk2
| Ubuntu 18.04.5 LTS -- GTK 2.24.32 | PID 13053
Unhandled exception: EClassNotFound: Class "TRadioGroup" not found
Stack trace:
$00000000004A91B5 in /usr/lib/doublecmd/doublecmd
$00000000004A6691 in /usr/lib/doublecmd/doublecmd
$00000000004A6D8C in /usr/lib/doublecmd/doublecmd
$00000000004A8785 in /usr/lib/doublecmd/doublecmd
$0000000000677F5D line 3183, column 47 of lresources.pp in /usr/lib/doublecmd/doublecmd
$000000000066FB31 line 804, column 13 of lresources.pp in /usr/lib/doublecmd/doublecmd
$00000000004DFD86 line 2061, column 43 of include/customform.inc in /usr/lib/doublecmd/doublecmd
$00000000004DFC12 line 2049, column 10 of include/customform.inc in /usr/lib/doublecmd/doublecmd
$00000000004E2F51 line 3168, column 3 of include/customform.inc in /usr/lib/doublecmd/doublecmd
$0000000000888C6D line 155, column 12 of fdialogbox.pas in /usr/lib/doublecmd/doublecmd
$0000000000000005 in
$0000000000000074 in

Double Commander
Version: 0.8.2 beta
Revision: 8010
Build date: 2018/03/07
Lazarus: 1.8.2.0
FPC: 3.0.4
Platform: x86_64-Linux-gtk2
OS version: Ubuntu 18.04.5 LTS

Widgetset library: GTK 2.24.32

Could you help me?

Cannot build

Xubuntu 19.10
sources from https://github.com/ivanenko/cloud_storage

cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release . -Bcmake-build-release

-- Build files have been written to: /.../TMP/cloud_storage-master/cmake-build-release

cmake --build cmake-build-release --target cloud_storage -- -j 2

Scanning dependencies of target cloud_storage
[ 20%] Building CXX object CMakeFiles/cloud_storage.dir/library.cpp.o
[ 20%] Building CXX object CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o
In file included from /.../TMP/cloud_storage-master/plugin_utils.h:25,
from /.../TMP/cloud_storage-master/plugin_utils.cpp:32:
/.../cloud_storage-master/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/.../TMP/cloud_storage-master/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
50 | }
| ^
/.../TMP/cloud_storage-master/service_clients/service_client.h: At global scope:
/.../TMP/cloud_storage-master/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
68 | std::__cxx11::string url_encode(const std::__cxx11::string& s);
| ^~~~~~
/.../TMP/cloud_storage-master/plugin_utils.cpp: In function ‘nlohmann::json& get_connection_config(nlohmann::json&, std::string&)’:
/.../TMP/cloud_storage-master/plugin_utils.cpp:141:12: warning: reference to local variable ‘j_null’ returned [-Wreturn-local-addr]
141 | return j_null;
| ^~~~~~
/.../TMP/cloud_storage-master/plugin_utils.cpp:140:20: note: declared here
140 | nlohmann::json j_null(nlohmann::json::value_t::null);
| ^~~~~~
In file included from /.../TMP/cloud_storage-master/plugin_utils.h:25,
from /.../TMP/cloud_storage-master/library.cpp:30:
/.../TMP/cloud_storage-master/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/.../TMP/cloud_storage-master/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
50 | }
| ^
/.../TMP/cloud_storage-master/service_clients/service_client.h: At global scope:
/.../TMP/cloud_storage-master/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
68 | std::__cxx11::string url_encode(const std::__cxx11::string& s);
| ^~~~~~
make[3]: *** [CMakeFiles/cloud_storage.dir/build.make:76: CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o] Ошибка 1
make[3]: *** Ожидание завершения заданий…
make[3]: *** [CMakeFiles/cloud_storage.dir/build.make:63: CMakeFiles/cloud_storage.dir/library.cpp.o] Ошибка 1
make[2]: *** [CMakeFiles/Makefile2:73: CMakeFiles/cloud_storage.dir/all] Ошибка 2
make[1]: *** [CMakeFiles/Makefile2:85: CMakeFiles/cloud_storage.dir/rule] Ошибка 2
make: *** [Makefile:118: cloud_storage] Ошибка 2

Cannot compile on Ubunutu 20.04

I followed the instructions as per https://github.com/ivanenko/cloud_storage#installation i.e.

sudo apt-get install g++ libssl-dev
git clone https://github.com/ivanenko/cloud_storage.git
cd cloud_storage
mkdir cmake-build-release
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release . -Bcmake-build-release
cmake --build cmake-build-release --target cloud_storage -- -j 2

I get the following returned and the compiling fails

Consolidate compiler generated dependencies of target cloud_storage
[ 10%] Building CXX object CMakeFiles/cloud_storage.dir/library.cpp.o
[ 20%] Building CXX object CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/plugin_utils.cpp:32:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
/home/xxx/Installs/cloud_storage/plugin_utils.cpp: In function ‘nlohmann::json& get_connection_config(nlohmann::json&, std::string&)’:
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:141:12: warning: reference to local variable ‘j_null’ returned [-Wreturn-local-addr]
  141 |     return j_null;
      |            ^~~~~~
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:140:20: note: declared here
  140 |     nlohmann::json j_null(nlohmann::json::value_t::null);
      |                    ^~~~~~
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/library.cpp:30:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloConsolidate compiler generated dependencies of target cloud_storage
[ 10%] Building CXX object CMakeFiles/cloud_storage.dir/library.cpp.o
[ 20%] Building CXX object CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/plugin_utils.cpp:32:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
/home/xxx/Installs/cloud_storage/plugin_utils.cpp: In function ‘nlohmann::json& get_connection_config(nlohmann::json&, std::string&)’:
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:141:12: warning: reference to local variable ‘j_null’ returned [-Wreturn-local-addr]
  141 |     return j_null;
      |            ^~~~~~
/home/xxx/Installs/cloud_storage/plugin_utils.cpp:140:20: note: declared here
  140 |     nlohmann::json j_null(nlohmann::json::value_t::null);
      |                    ^~~~~~
In file included from /home/xxx/Installs/cloud_storage/plugin_utils.h:25,
                 from /home/xxx/Installs/cloud_storage/library.cpp:30:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/xxx/Installs/cloud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:90: CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:76: CMakeFiles/cloud_storage.dir/library.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cloud_storage.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/cloud_storage.dir/rule] Error 2
gmake: *** [Makefile:124: cloud_storage] Error 2ud_storage/service_clients/service_client.h: At global scope:
/home/xxx/Installs/cloud_storage/service_clients/service_client.h:68:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type; did you mean ‘to_string’?
   68 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
      |                   to_string
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:90: CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: *** [CMakeFiles/cloud_storage.dir/build.make:76: CMakeFiles/cloud_storage.dir/library.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cloud_storage.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:90: CMakeFiles/cloud_storage.dir/rule] Error 2
gmake: *** [Makefile:124: cloud_storage] Error 2

OS details:

  • Linux xxx 5.15.0-40-generic #43-Ubuntu SMP Wed Jun 15 12:54:21 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Distributor ID: Ubuntu
  • Description: Ubuntu 22.04 LTS
  • Release: 22.04
  • Codename: jammy

cannot compile code

I just tried to compile a fresh clone of the code:

$ git clone https://github.com/ivanenko/cloud_storage.git
Cloning into 'cloud_storage'...
remote: Enumerating objects: 192, done.
remote: Counting objects: 100% (192/192), done.
remote: Compressing objects: 100% (128/128), done.
remote: Total 192 (delta 142), reused 113 (delta 63), pack-reused 0
Receiving objects: 100% (192/192), 199.00 KiB | 842.00 KiB/s, done.
Resolving deltas: 100% (142/142), done.

$ mkdir cloud_storage/cmake-build-release

$ pushd cloud_storage/ 
~/forskelligt/cloud_storage ~/forskelligt

$ cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release . -Bcmake-build-release
-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/freddy/forskelligt/cloud_storage/cmake-build-release

$ cmake --build cmake-build-release --target cloud_storage -- -j 2
make[1]: warning: -jN forced in submake: disabling jobserver mode.
make[2]: warning: -jN forced in submake: disabling jobserver mode.
make[3]: warning: -jN forced in submake: disabling jobserver mode.
Scanning dependencies of target cloud_storage
make[3]: warning: -jN forced in submake: disabling jobserver mode.
[ 11%] Building CXX object CMakeFiles/cloud_storage.dir/library.cpp.o
[ 22%] Building CXX object CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o
[ 33%] Building CXX object CMakeFiles/cloud_storage.dir/service_clients/service_client.cpp.o
[ 44%] Building CXX object CMakeFiles/cloud_storage.dir/dialogs.cpp.o
In file included from /home/freddy/forskelligt/cloud_storage/service_clients/yandex_rest_client.h:25,
                 from /home/freddy/forskelligt/cloud_storage/service_clients/service_client.cpp:21:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: At global scope:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:67:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
   67 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
In file included from /home/freddy/forskelligt/cloud_storage/plugin_utils.h:25,
                 from /home/freddy/forskelligt/cloud_storage/plugin_utils.cpp:32:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: At global scope:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:67:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
   67 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
/home/freddy/forskelligt/cloud_storage/plugin_utils.cpp: In function ‘nlohmann::json& get_connection_config(nlohmann::json&, std::string&)’:
/home/freddy/forskelligt/cloud_storage/plugin_utils.cpp:141:12: warning: reference to local variable ‘j_null’ returned [-Wreturn-local-addr]
  141 |     return j_null;
      |            ^~~~~~
/home/freddy/forskelligt/cloud_storage/plugin_utils.cpp:140:20: note: declared here
  140 |     nlohmann::json j_null(nlohmann::json::value_t::null);
      |                    ^~~~~~
In file included from /home/freddy/forskelligt/cloud_storage/service_clients/dummy_client.h:24,
                 from /home/freddy/forskelligt/cloud_storage/service_clients/service_factory.h:24,
                 from /home/freddy/forskelligt/cloud_storage/dialogs.cpp:26:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: At global scope:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:67:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
   67 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
In file included from /home/freddy/forskelligt/cloud_storage/plugin_utils.h:25,
                 from /home/freddy/forskelligt/cloud_storage/library.cpp:30:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: In member function ‘virtual const char* service_client_exception::what() const’:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h: At global scope:
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.h:67:19: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
   67 |     std::__cxx11::string url_encode(const std::__cxx11::string& s);
      |                   ^~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp: In function ‘intptr_t DlgProcNew(uintptr_t, char*, intptr_t, intptr_t, intptr_t)’:
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:281:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  281 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "cmbService", DM_LISTADD, (intptr_t)p.second.c_str(), (intptr_t)p.first.c_str());
      |                                                     ^~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:283:49: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  283 |             gExtensionInfoPtr->SendDlgMsg(pDlg, "saveMethodRadio", DM_LISTSETITEMINDEX, 0, 0);
      |                                                 ^~~~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:291:71: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  291 |                 userName = (char*)gExtensionInfoPtr->SendDlgMsg(pDlg, "edtUserName", DM_GETTEXT, 1, 0);
      |                                                                       ^~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:294:68: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  294 |                 int res = (int)gExtensionInfoPtr->SendDlgMsg(pDlg, "cmbService", DM_LISTGETITEMINDEX, 0, 0);
      |                                                                    ^~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:298:59: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  298 |                 res = gExtensionInfoPtr->SendDlgMsg(pDlg, "saveMethodRadio", DM_LISTGETITEMINDEX, 0, 0);
      |                                                           ^~~~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp: In function ‘intptr_t DlgProcProps(uintptr_t, char*, intptr_t, intptr_t, intptr_t)’:
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:340:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  340 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "getTokenRadio", DM_LISTSETITEMINDEX, 1, 0);
      |                                                     ^~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:342:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  342 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "getTokenRadio", DM_LISTSETITEMINDEX, 0, 0);
      |                                                     ^~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:346:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  346 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "saveMethodRadio", DM_LISTSETITEMINDEX, 1, 0);
      |                                                     ^~~~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:349:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  349 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "saveMethodRadio", DM_LISTSETITEMINDEX, 2, 0);
      |                                                     ^~~~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:351:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  351 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "saveMethodRadio", DM_LISTSETITEMINDEX, 0, 0); // dont_save by default
      |                                                     ^~~~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:354:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  354 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "edtClientID", DM_SETTEXT, (intptr_t)gpJsonConnection->at("client_id").get<std::string>().c_str(), 0);
      |                                                     ^~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:358:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  358 |                 gExtensionInfoPtr->SendDlgMsg(pDlg, "edtServerPort", DM_SETTEXT, (intptr_t)port.c_str(), 0);
      |                                                     ^~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:365:63: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  365 |                 int res = gExtensionInfoPtr->SendDlgMsg(pDlg, "getTokenRadio", DM_LISTGETITEMINDEX, 0, 0);
      |                                                               ^~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:368:59: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  368 |                 res = gExtensionInfoPtr->SendDlgMsg(pDlg, "saveMethodRadio", DM_LISTGETITEMINDEX, 0, 0);
      |                                                           ^~~~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:382:71: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  382 |                 clientId = (char*)gExtensionInfoPtr->SendDlgMsg(pDlg, "edtClientID", DM_GETTEXT, 1, 0);
      |                                                                       ^~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/dialogs.cpp:389:73: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  389 |                 portNumber = (char*)gExtensionInfoPtr->SendDlgMsg(pDlg, "edtServerPort", DM_GETTEXT, 1, 0);
      |                                                                         ^~~~~~~~~~~~~~~
/home/freddy/forskelligt/cloud_storage/service_clients/service_client.cpp:113:15: error: ‘string’ in namespace ‘std::__cxx11’ does not name a type
  113 | std::__cxx11::string ServiceClient::url_encode(const std::__cxx11::string& s)
      |               ^~~~~~
make[3]: *** [CMakeFiles/cloud_storage.dir/build.make:76: CMakeFiles/cloud_storage.dir/plugin_utils.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/cloud_storage.dir/build.make:89: CMakeFiles/cloud_storage.dir/dialogs.cpp.o] Error 1
make[3]: *** [CMakeFiles/cloud_storage.dir/build.make:102: CMakeFiles/cloud_storage.dir/service_clients/service_client.cpp.o] Error 1
make[3]: *** [CMakeFiles/cloud_storage.dir/build.make:63: CMakeFiles/cloud_storage.dir/library.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/cloud_storage.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/cloud_storage.dir/rule] Error 2
make: *** [Makefile:118: cloud_storage] Error 2

What am I missing to compile the code ? I do not really know what I am doing here, I just followed your recipe for compiling.

Double Commander
Version: 0.9.6 beta
Revision: 9018
Build date: 2019/09/01
Lazarus: 2.0.4.0
FPC: 3.0.4
Platform: x86_64-Linux-qt5
OS version: Manjaro Linux

Widgetset library: Qt 5.13.0, libQt5Pas 5.6.1

feature request: configurable timeout

Please make it possible to configure the length of the timeout for getting a verification and establishing a connection.

I have two Google Drive connections in Double Commander, and one of them demands that I verify by entering a code I get in a text message. By the time the message arrives, cloud_storage_linux64.wfx has already given up etablishing the connection and declares Timeout. When I have entered the verification code and logged in to Google Drive, the browser says "Firefox can’t establish a connection to the server at localhost:3359" because of the timeout.

When I log in to the Google Drive account via the browser, I can access the content via the browser, so the account is not blocked. I have tried removing my phone number from the account's settings, but when the cloud_storage_linux64.wfx tries to connect, the Google login still demands a verification.

The other Google Drive connection works just fine. I attempt to enter the shortcut in wfx://Cloud Storage , the default browser (Firefox) opens and I log in to the Google Drive account, and the browser says Success, and I can close the browser and the account directory is open in Double Commander.

The two accounts are configured like this in $DC_CONFIG_PATH/cloud_storage.ini :

{
"client_id": null,
"get_token_method": "oauth",
"name": "Googledrive account that demands verification",
"oauth_token": "",
"port": 3359,
"save_type": "config",
"service": "gdrive",
"user_name": "[email protected]"
},
{
"client_id": null,
"get_token_method": "oauth",
"name": "Googledrive that works fine",
"oauth_token": "here is the token string removed",
"port": 3359,
"save_type": "config",
"service": "gdrive",
"user_name": "[email protected]"
},

Double Commander
Version: 0.9.8 beta
Revision: 9296
Build date: 2020/02/01
Lazarus: 2.0.6.0
FPC: 3.0.4
Platform: x86_64-Linux-qt5
OS version: Manjaro Linux
Widgetset library: Qt 5.14.1, libQt5Pas 5.6.1

for inspiration: rclone

Hello Ivanenko

You may find some inspiration in the code on rclone.org. It is written in Go, but the program logic might give you some pointers for how to handle OneDrive and others.

I use rclone mount to mount my OneDrive storage. It works well, but it is not as elegant as using your cloud_storage plugin.

Best regards
Freddy

Cannot install: not a valid plugin

I have downloaded the compiled plugin cloud_storage_linux64.wfx from the 1.0 release. When I try to install it in Double Commander I get the following error message:

This is not a valid plugin!

Steps to reproduce:

  1. Open the Double Commander's Options dialog
  2. Navigate to Plugins > Plugins WFX
  3. Click the Add button
  4. Open the file cloud_storage_linux64.wfx
  5. The dialog saying "This is not a valid plugin!" appears

Am I doing anything wrong?

I'm running Double Commander 1.0.5 beta 64-bit on Ubuntu 20.04.3 64-bit.

Problems with cloud_storage

I can't to get cloud_storage to functions.I try to compile it from source, without success.
Firstly was problem with std::__cxx1::string declaration, when I remove __cx11:: compile is fine???
After that adding to plugins is OK, but GDrive don't display file and folder name, but ID-s.

My system is Ubuntu 22.04. What to do?
Thanx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.