View Code? Open in Web Editor
NEW
This project forked from grive /grive
an open source Linux client for Google Drive
Home Page: http://www.lbreda.com/grive/start
License: GNU General Public License v2.0
grive's Introduction
Grive 0.3.1
25 July 2012
http://www.lbreda.com/grive/
Grive can be considered still 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 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
directory named .trash or put them in the Google Drive trash. You can always recover them.
There are a few things that Grive does not do at the moment:
- wait for changes in file system to occur and upload. A sync is only performed when you run Grive.
- symbolic links support
- support for Google documents
Of course these will be added in the future, possibly the next release.
You need the following libraries:
- json-c
- libcurl
- libstdc++
- libgcrypt
- Boost (Boost filesystem and program_option are required)
There are also some optional dependencies:
- CppUnit (for unit tests)
- libbfd (for backtrace)
- binutils (for libiberty, required for compilation in OpenSUSE & ubuntu)
Grive uses cmake to build, see the instructions in:
http://www.lbreda.com/grive/installation
...for detailed procedures to compile Grive.
When Grive is run for the first time, you should use the "-a" argument to grant
permission to Grive to access to your Google Drive. A URL should be printed.
Go to the link. You will need to login to your Google account if you haven't
done so. After granting the permission to Grive, the browser will show you
an authenication code. Copy-and-paste that to the standard input of Grive.
If everything works fine, Grive will create .grive and .grive_state files in your
current directory. It will also start downloading files from your Google Drive to
your current directory.
Enjoy!
Version History:
Grive v0.3.1: Bug fix & minor feature release
Fixed bugs:
#93: missing reference count increment in one of the Json constructors
#82: retry for HTTP error 500 & 503
#77: Fixed a bug where grive crashed on the first run.
New features:
#87: support for revisions
#86: partial sync (contributed by justin at tierramedia.com)
grive's People
grive's Issues
Add support of kernel drive interface for synchronized folders service
Add implementation of service support to be grive executed as background process or daemon.
Add support Google translate for immediate translate previewed documents like text files,pdf, doc.
Exception acording incorect data type long int to long conversion up on last changes with yajl data types.
Stack trace
exception: /home/jpuchky/Projects/grive/libgrive/src/protocol/AuthAgent.cc(174): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const std::string&, const gr::http::Header&)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x4ec343 :0 gr::Exception::Exception()
#1 0x4d0aa5 :0 gr::http::Error::Error()
#2 0x4d775e :0 gr::AuthAgent::CheckHttpResponse(long, std::string const&, gr::http::Header const&)
#3 0x4d7067 :0 gr::AuthAgent::Put(std::string const&, gr::File_, gr::DataStream_, gr::http::Header const&)
#4 0x4c1eea :0 gr::v1::Resource::Upload(gr::http::Agent_, std::string const&, bool)
#5 0x4c10f1 :0 gr::v1::Resource::EditContent(gr::http::Agent_, bool)
#6 0x4c003d :0 gr::v1::Resource::SyncSelf(gr::http::Agent_, gr::Json const&)
#7 0x4bf9f4 :0 gr::v1::Resource::Sync(gr::http::Agent_, gr::DateTime&, gr::Json const&)
Grive#8 0x4c8001 :0 boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>::operator()(gr::v1::Resource , gr::http::Agent_, gr::DateTime&, gr::Json const&) const
Grive#9 0x4c703b :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json >::operator()<boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list1gr::v1::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>&, boost::_bi::list1gr::v1::Resource*&&, int)
Grive#10 0x4c5f8a :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >::operator()gr::v1::Resource*(gr::v1::Resource &)
Grive#11 0x4c43d5 :0 boost::_bi::bind_t<void, boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > std::for_each<__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > >(__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, __gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::bi::list4boost::arg<1, boost::bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >)
Grive#12 0x4bfaf8 :0 gr::v1::Resource::Sync(gr::http::Agent , gr::DateTime&, gr::Json const&)
Grive#13 0x4c8001 :0 boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>::operator()(gr::v1::Resource , gr::http::Agent , gr::DateTime&, gr::Json const&) const
Grive#14 0x4c703b :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json >::operator()<boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list1gr::v1::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>&, boost::_bi::list1gr::v1::Resource*&&, int)
Grive#15 0x4c5f8a :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >::operator()gr::v1::Resource*(gr::v1::Resource &)
Grive#16 0x4c43d5 :0 boost::_bi::bind_t<void, boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > std::for_each<__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > >(__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, __gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::bi::list4boost::arg<1, boost::bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >)
Grive#17 0x4bfaf8 :0 gr::v1::Resource::Sync(gr::http::Agent , gr::DateTime&, gr::Json const&)
Grive#18 0x4c8001 :0 boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>::operator()(gr::v1::Resource , gr::http::Agent , gr::DateTime&, gr::Json const&) const
Grive#19 0x4c703b :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json >::operator()<boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list1gr::v1::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>&, boost::_bi::list1gr::v1::Resource*&&, int)
Grive#20 0x4c5f8a :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >::operator()gr::v1::Resource*(gr::v1::Resource &)
Grive#21 0x4c43d5 :0 boost::_bi::bind_t<void, boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > std::for_each<__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > >(__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, __gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::bi::list4boost::arg<1, boost::bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >)
Grive#22 0x4bfaf8 :0 gr::v1::Resource::Sync(gr::http::Agent , gr::DateTime&, gr::Json const&)
Grive#23 0x4c8001 :0 boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>::operator()(gr::v1::Resource , gr::http::Agent , gr::DateTime&, gr::Json const&) const
Grive#24 0x4c703b :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json >::operator()<boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list1gr::v1::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>&, boost::_bi::list1gr::v1::Resource*&&, int)
Grive#25 0x4c5f8a :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >::operator()gr::v1::Resource*(gr::v1::Resource &)
Grive#26 0x4c43d5 :0 boost::_bi::bind_t<void, boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > std::for_each<__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > >(__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, __gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::bi::list4boost::arg<1, boost::bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >)
Grive#27 0x4bfaf8 :0 gr::v1::Resource::Sync(gr::http::Agent , gr::DateTime&, gr::Json const&)
Grive#28 0x4c8001 :0 boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>::operator()(gr::v1::Resource , gr::http::Agent , gr::DateTime&, gr::Json const&) const
Grive#29 0x4c703b :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json >::operator()<boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list1gr::v1::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>&, boost::_bi::list1gr::v1::Resource*&&, int)
Grive#30 0x4c5f8a :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >::operator()gr::v1::Resource*(gr::v1::Resource &)
Grive#31 0x4c43d5 :0 boost::_bi::bind_t<void, boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > std::for_each<__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > >(__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, __gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::bi::list4boost::arg<1, boost::bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >)
Grive#32 0x4bfaf8 :0 gr::v1::Resource::Sync(gr::http::Agent , gr::DateTime&, gr::Json const&)
Grive#33 0x4c8001 :0 boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>::operator()(gr::v1::Resource , gr::http::Agent , gr::DateTime&, gr::Json const&) const
Grive#34 0x4c703b :0 void boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json >::operator()<boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list1gr::v1::Resource*& >(boost::_bi::type, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>&, boost::_bi::list1gr::v1::Resource*&&, int)
Grive#35 0x4c5f8a :0 void boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >::operator()gr::v1::Resource*(gr::v1::Resource &)
Grive#36 0x4c43d5 :0 boost::_bi::bind_t<void, boost::mfi::mf3<void, gr::v1::Resource, gr::http::Agent , gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > std::for_each<__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::_bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::_bi::valuegr::Json > > >(__gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, __gnu_cxx::__normal_iterator<gr::v1::Resource**, std::vector<gr::v1::Resource*, std::allocatorgr::v1::Resource* > >, boost::_bi::bind_t<void, boost::_mfi::mf3<void, gr::v1::Resource, gr::http::Agent*, gr::DateTime&, gr::Json const&>, boost::_bi::list4boost::arg<1, boost::bi::valuegr::http::Agent*, boost::reference_wrappergr::DateTime, boost::bi::valuegr::Json > >)
Grive#37 0x4bfaf8 :0 gr::v1::Resource::Sync(gr::http::Agent , gr::DateTime&, gr::Json const&)
Grive#38 0x4ccaa0 :0 gr::v1::State::Sync(gr::http::Agent , gr::Json const&)
Grive#39 0x4b4c30 :0 gr::v1::Drive::Update()
Grive#40 0x49f5d0 :0 Main(int, char**)
Grive#41 0x49f7f6 :0 main
Grive#42 0x3a7c01ed1d /lib64/libc.so.6 __libc_start_main
Grive#43 0x49de49 :0 _start
[PN2gr4http15HttpResponseTagE] = 400
[PN2gr4http6UrlTagE] = https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0B0qMvNLuI477R0ttQ0wzVjhSN2s?upload_id=AEnB2Uoy85TSSdRcODxeUTvvuFQxpT3wOw2j1q0QtJDZF2utJpgwbkQFeIUSNgFSoynZoujdRmjMNJM_HxB_IX6jK6qC_XzwWA
[PN2gr4http9HeaderTagE] = Expect:
Accept:
Authorization: Bearer ya29.1.AADtN_XLU6scCJvGXUdrkbtXZd5mqr5wUzA4bT2HTz3EfA-SnoIUHz8SnEPTF_Ju7Q6GX6c
GData-Version: 3.0
Complete implementation of GUI interface as was Qt4 supported, with support of live preview documents and videos.
Add inotify support for automatic schedule and process changes in folder, when is grive executed as application or background daemon.
In file included from /home/jpuchky/Projects/grive/libgrive/src/drive/Resource.hh:22,
from /home/jpuchky/Projects/grive/libgrive/src/drive/ResourceTree.hh:22,
from /home/jpuchky/Projects/grive/libgrive/src/drive/ResourceTree.cc:20:
/home/jpuchky/Projects/grive/libgrive/src/protocol/OAuth2.hh:53: error: ‘time_t’ in namespace ‘std’ does not name a type
In file included from /home/jpuchky/Projects/grive/libgrive/src/drive/ResourceTree.hh:22,
from /home/jpuchky/Projects/grive/libgrive/src/drive/ResourceTree.cc:20:
/home/jpuchky/Projects/grive/libgrive/src/drive/Resource.hh:102: error: expected unqualified-id before ‘&’ token
/home/jpuchky/Projects/grive/libgrive/src/drive/Resource.hh:102: error: expected ‘)’ before ‘&’ token
/home/jpuchky/Projects/grive/libgrive/src/drive/Resource.hh:102: error: expected ‘;’ before ‘&’ token
/home/jpuchky/Projects/grive/libgrive/src/drive/Resource.hh:162: error: ISO C++ forbids declaration of ‘Json’ with no type
/home/jpuchky/Projects/grive/libgrive/src/drive/Resource.hh:162: error: expected ‘,’ or ‘...’ before ‘&’ token
make[2]: *** [libgrive/CMakeFiles/grive.dir/src/drive/ResourceTree.cc.o] Error 1
make[1]: *** [libgrive/CMakeFiles/grive.dir/all] Error 2