Skip to content

Commit

Permalink
update main acc to config
Browse files Browse the repository at this point in the history
Signed-off-by: bupd <[email protected]>
  • Loading branch information
bupd committed Jan 21, 2025
1 parent 6665144 commit 6664449
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,28 @@ import (
"time"

cal "github.com/bupd/timeotter/pkg/calendar"
"github.com/bupd/timeotter/pkg/config"
"github.com/bupd/timeotter/pkg/oauth"
"golang.org/x/oauth2/google"
"google.golang.org/api/calendar/v3"
"google.golang.org/api/option"
)

var (
CalendarID string = "[email protected]"
CmdToExec string = "mpv ~/video.mp4"
MaxRes int64 = 2
TokenFile string = "~/.cal-token.json"
CalendarID string
CmdToExec string
MaxRes int64
TokenFile string
)

func main() {
conf := config.GetConfig()

CalendarID = conf.CalendarID
CmdToExec = conf.CmdToExec
MaxRes = conf.MaxRes
TokenFile = conf.TokenFile

ctx := context.Background()
b, err := os.ReadFile("credentials.json")
if err != nil {
Expand Down

0 comments on commit 6664449

Please sign in to comment.