dschien / tasks-backup

Automatically exported from code.google.com/p/tasks-backup
Apache License 2.0
0 stars 0 forks source link

Exporting tasks remotely from python/bash script or from command line #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

It would be very useful to be able to "export" or "dump" my entire googletasks 
data to both CSV and HTML format from command line, to integrate it with my 
backup system.

Is it possible to login and access in google-tasks-porter remotely
from python (urllib2) and take an snapshot+dump of the tasks in both
formats to local disk so that I can backup them?

Or, even better, are you planning an "command line" version of Google
Tasks Backup so that the user can just call it locally?

Thanks. 

Original issue reported on code.google.com by srom...@gmail.com on 30 Apr 2012 at 5:35

GoogleCodeExporter commented 9 years ago
The difficulty is with Google's OAuth2 authentication process, which requires 
that the user authenticates directly with Google's secure web server using a 
web browser. See step 2 at
https://developers.google.com/accounts/docs/OAuth2

According to that page, it is definitely possible to create a command line 
application, but it will always be necessary to authenticate using a browser. 
The example given has the user copy a token from that browser session to the 
command line. I suppose that urllib could be used to respond to the Google 
authentication page, instead of using a browser.

The previous alternative, was to use ClientLogin, as per the example about 
halfway down 
http://stackoverflow.com/questions/101742/how-do-you-access-an-authenticated-goo
gle-app-engine-service-from-a-non-web-py
Unfortunately, according to 
https://developers.google.com/accounts/docs/AuthForInstalledApps
 that API has been deprecated as of April 2012!

I am happy to provide a simplified non-GUI HTTPS interface to GTB to enable 
users to use urllib2 to retrieve data, if somebody can write the client-side 
code that successfully authenticates using OAuth2.

Cheers,

Julie

Original comment by Julie.Sm...@gmail.com on 24 May 2012 at 7:16

GoogleCodeExporter commented 9 years ago
Is this LinkedIn example useful?
  https://developer.linkedin.com/documents/getting-oauth-token-python
It points to the example code here:
  https://github.com/synedra/python-oauth2/blob/master/example/client.py

Original comment by j...@kleckner.net on 7 Sep 2012 at 9:38

GoogleCodeExporter commented 9 years ago
This guy shows how to do this with Twitter:
  http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth

Original comment by j...@kleckner.net on 7 Sep 2012 at 9:50

GoogleCodeExporter commented 9 years ago
Nice overview here:
  http://blog.andydenmark.com/2009/03/how-to-build-oauth-consumer.html

Original comment by j...@kleckner.net on 7 Sep 2012 at 9:58