Code Monkey home page Code Monkey logo

googletaskexport's Introduction

GoogleTaskExport Status Aquana

This is a program to export the Google Tasks data from your Google account to a JSON file, or just print them in the terminal.

Usage

Client Secret

To use GoogleTaskExport, you'll have to register an application with Google and obtain a client secret file.

  1. Create a Google Cloud Project.
  2. On the Enabled APIs & services page, choose Enable APIs and Services, search for Google Tasks API and choose Enable.
  3. On the Google Tasks API page, click Create Credentials.
  4. On the Which API are you using? step, choose User data.
  5. On the OAuth Consent Screen step, configure it whatever you want.
    • One detail to remember is not to use the Google name in the application name. See here for more details.
  6. On the Scopes step, choose Google Tasks API (the one with the .readonly suffix), https://www.googleapis.com/auth/tasks.readonly.
  7. On the OAuth Client ID step, choose Desktop app. Specify the name as GoogleTaskExport.
  8. Download the resulting JSON file.
  9. Remember to add the users you want to use the application on the OAuth consent screen page, in the Test users list.

Running the Application

Use the following shell command:

$ dotnet run --project GoogleTaskExport -- [json|print] <userName> <path to the JSON credential file>

Here, <userName> is the user email, e.g. [email protected].

This command will fetch all the stored Google Tasks (including the completed ones, but omitting the deleted ones) and output them in the specified format.

Note that on the first run, it will open a browser window to ask you to grant the application access to your Google Tasks data.

If you want to flush the credential cache, delete the <homePath>/Google.Apis.Auth directory (or inspect the files and delete only the ones you want to flush; note that this is the default location for Google API libraries, so other programs may store their authentication tokens there as well), where <homePath> is %APPDATA% on Windows.

Documentation

googletaskexport's People

Contributors

fornever avatar

Stargazers

 avatar

Watchers

 avatar  avatar

googletaskexport's Issues

Token refresh

Currently, we don't support refreshing of the tokens in the cache.

If a token is outdated, the program will break.

We should support token refresh workflow.

Change the auth cache location

Currently, our Google Auth stores tokens in $"{GetHomePath()}/Google.Apis.Auth" (where GetHomePath() is %APPDATA% on Windows).

We should replace this with a custom cache stored in a program-specific folder.

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.