routine

package module
v0.0.0-...-3d46e8f Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &Z.Cmd{

	Name:      `routine`,
	Summary:   `a command that prints out current day routine schedule`,
	Version:   `v0.4.1`,
	Copyright: `Copyright 2022 Yongle Xu`,
	License:   `Apache-2.0`,
	Site:      `yonglexu.dev`,
	Source:    `git@github.com:rwx-yxu/routine.git`,
	Issues:    `github.com/rwx-yxu/routine/issues`,

	Commands: []*Z.Cmd{
		todayCmd,

		help.Cmd, conf.Cmd, vars.Cmd, emb.Cmd, printCmd,
	},

	Description: `
		{{cmd .Name}} is a tool that prints out google calendar events for the day along with any reminders. The output will be to a text file that is fed into a thermal printer. Google API key will be required to be set using routine conf edit.
			`,
}

Functions

func GetClient

func GetClient(config *oauth2.Config) *http.Client

Retrieve a token, saves the token, then returns the generated client.

func GetService

func GetService() (*calendar.Service, error)

func GetTokenFromWeb

func GetTokenFromWeb(config *oauth2.Config) *oauth2.Token

Request a token from the web, then returns the retrieved token.

func Print

func Print(e *calendar.Events, name string)

func SaveToken

func SaveToken(token *oauth2.Token)

Saves a token to bonzai config

func TokenFromFile

func TokenFromFile(config *oauth2.Config) (*oauth2.Token, error)

Retrieves a token from a local file.

Types

This section is empty.

Directories

Path Synopsis
cmd
routine command

Jump to

Keyboard shortcuts

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