-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
32 lines (24 loc) · 676 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package main
import (
"fmt"
"os"
"github.com/ptdewey/blueprinter/internal/config"
"github.com/ptdewey/blueprinter/internal/data"
"github.com/ptdewey/blueprinter/internal/model"
"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"
)
func main() {
cfg := config.ParseConfig()
items := data.GetItems(cfg.TemplateSources)
m := model.Model{
List: list.New(items, list.NewDefaultDelegate(), 0, 0),
TemplateSources: cfg.TemplateSources,
}
m.List.Title = "Available Templates"
p := tea.NewProgram(m, tea.WithAltScreen())
if _, err := p.Run(); err != nil {
fmt.Println("Error running program:", err)
os.Exit(1)
}
}