gtodo

command module
v0.0.0-...-5ba4334 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

gtodo

A command line tool for using Google Tasks basic actions.

Installation

if you have a Go env

  • Use Makefile or self build

Author's env go version go1.15.3 darwin/amd64

Set up

credentials.json, token.json and config.yaml are required

  1. make and download credentials.json from Google Tasks API Go quickstart(Details on how to do exactly that can be found there.)
  2. make dir ~/.config/gtodo and move credentials.json to ~/.config/gtodo/
  3. $ gtodo login or other command download token.json automatically to ~/.config/gtodo
  4. make config.yaml into ~/.config/gtodo/
# config.yaml
listid: foobarbuz # <- write your default TODO Task List ID.

you can check the TODO List ID with the $ gtodo lists show

Usage

Show TODO Lists
$ gtodo lists show
TODO Lists:
ListsName (your list id)
Create TODO List
$ gtodo lists create -t new_todo_list
Created TODO List!! new_todo_list

$ gtodo lists show
TODO Lists:
Main (your list id1)
new_todo_list (your list id2)
Show Tasks (you can only see one list of tasks)
$ gtodo tasks show
[1] task1
  Note:
  Status: needsAction
  Due: Date not set
[2] task2
  Note: sample description
  Status: needsAction
  Due: Date not set
[3] task3
  Note:
  Status: needsAction
  Due: 2021/4/20 00:00:00
Create Task
$ gtodo tasks add
InputTitle:: task4
InputNote(press enter skip)::
InputDueDate(ex. 2021-04-01)(press enter skip)::
task4 created
$ gtodo tasks show
[1] task4
  Note:
  Status: needsAction
  Due: Date not set
[2] task1
  Note:
  Status: needsAction
  Due: Date not set
[3] task2
  Note: sample description
  Status: needsAction
  Due: Date not set
[4] task3
  Note:
  Status: needsAction
  Due: 2021/4/20 00:00:00
Delete Task
$ gtodo tasks rm
[1] task4
  Note:
  Status: needsAction
  Due: Date not set
[2] task1
  Note:
  Status: needsAction
  Due: Date not set
[3] task2
  Note: sample description
  Status: needsAction
  Due: Date not set
[4] task3
  Note:
  Status: needsAction
  Due: 2021/4/20 00:00:00
✔ Input Task Num:: 1
Deleted: task4
$ gtodo tasks show
[1] task1
  Note:
  Status: needsAction
  Due: Date not set
[2] task2
  Note: sample description
  Status: needsAction
  Due: Date not set
[3] task3
  Note:
  Status: needsAction
  Due: 2021/4/20 00:00:00
Mark up as Done
$ gtodo tasks done
[1] task4
  Note:
  Status: needsAction
[2] task1
  Note:
  Status: needsAction
  Due: Date not set
[3] task2
  Note: sample description
  Status: needsAction
  Due: Date not set
[4] task3
  Note:
  Status: needsAction
  Due: 2021/4/20 00:00:00
Input Task Num:: 1
Mark up as complete: task4
$ gtodo tasks show
[1] task1
  Note:
  Status: needsAction
  Due: Date not set
[2] task2
  Note: sample description
  Status: needsAction
  Due: Date not set
[3] task3
  Note:
  Status: needsAction
  Due: 2021/4/20 00:00:00
Get token.json automatically

$ gtodo login

Thanks

Documentation

Overview

Copyright © 2021 devoc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL