Export/import all Google Tasks to org files.
This module has been 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/"
:login "massonju.eseo@gmail.com"
: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
- Add yourself as Test users in OAuth consent screen.
You have now a project that accepts OAuth credentials and enables 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.
Note: the OAuth token file is stored in the directory where the org
files are written, named .refresh-token
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: (defined in org-gtasks-actions
)
Actions | Descriptions |
---|---|
Push | push one or all taskslists |
Fetch | fetch one or all taskslists (org file not updated) |
Pull | pull one or all taskslists |
Add | add taskslists on the gtasks account |
Remove | remove taskslists present on the gtasks account |
Currently, org-gtasks
does not understand or map the hierachical structure of tasks.
Mailing list: https://lists.sr.ht/~jmasson/org-gtasks
Bug/Feature tracker: todo