43 lines
800 B
Go
43 lines
800 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
"tasksquire/common"
|
|
"tasksquire/model"
|
|
"tasksquire/taskwarrior"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
)
|
|
|
|
func main() {
|
|
ts := taskwarrior.NewTaskSquire("./test/taskrc")
|
|
ctx := context.Background()
|
|
common := common.NewCommon(ctx, ts)
|
|
|
|
// form := huh.NewForm(
|
|
// huh.NewGroup(
|
|
// huh.NewSelect[string]().
|
|
// Options(huh.NewOptions(config.Reports...)...).
|
|
// Title("Report").
|
|
// Description("Choose the report to display").
|
|
// Value(&report),
|
|
// ),
|
|
// )
|
|
|
|
// err = form.Run()
|
|
// if err != nil {
|
|
// slog.Error("Uh oh:", err)
|
|
// os.Exit(1)
|
|
// }
|
|
m := model.NewMainModel(common)
|
|
|
|
if _, err := tea.NewProgram(m, tea.WithAltScreen()).Run(); err != nil {
|
|
fmt.Println("Error running program:", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
}
|