Export/import all Google Tasks to org files.
This module has been HIGHLY inspired by org-gcal.
org-gtasks
will
- sync all the task lists you have into org files, one per list
- map
TODO
andDONE
status to the same on Google Tasks
You can define an account, identified by its name and with org files stored in a particular directory like so:
(require 'org-gtasks)
(org-gtasks-register-account :name "Perso"
:directory "~/.emacs.d/gtasks/"
:client-id "XXXX"
:client-secret "XXXX")
- Go to Google Developers Console
- Create a project (with any name)
- Click on the project
- Click on APIs & Services then Credentials
- Click on Create credentials and select OAuth Client ID
- Select Application type Desktop and give a name (e.g. emacs)
- Click on Create
- Copy the Client ID and Client secret into the relevant fields in the config (see below)
- Under the same APIs & Services menu section, select Library
- Search for Tasks API, click on it and click Enable
You have now a project that accepts OAuth credentials and anables the Tasks API for them.
The first time you use org-gtasks
, you need to authenticate.
These are the steps you will go through:
- Make sure Emacs has read your config. Then,
M-x org-gtasks
will show a prompt asking for the account. Enter its name, e.g. Perso as in the example config above. - It will ask for the action, enter Pull.
- It will open your browser, and ask you to login. Then it will show a code, that you need to …
- … paste into the minibuffer where it asks about it.
You’re done! You should now find one file per task list in the directory you have configured.
Type M-x org-gtasks
, enter the account name, an action,
and the operation takes a few seconds and you are done.
Possible actions are Push and Pull (defined in org-gtasks-actions
).
Currently, org-gtasks
does not yet sync the dates, nor does it
understand or map the hierachical structure of tasks.