(Feat): Initial Commit, Termdoku
This commit is contained in:
30
cmd/termdoku/main.go
Normal file
30
cmd/termdoku/main.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"termdoku/internal/config"
|
||||
"termdoku/internal/theme"
|
||||
"termdoku/internal/ui"
|
||||
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Legacy flags kept but ignored when menu is used
|
||||
_ = flag.Bool("daily", false, "Generate daily puzzle")
|
||||
_ = flag.String("difficulty", "normal", "Difficulty: easy|normal|hard|lunatic")
|
||||
flag.Parse()
|
||||
|
||||
// Create example theme on first run (if it doesn't exist)
|
||||
_ = theme.CreateExampleTheme()
|
||||
|
||||
cfg, _ := config.Load()
|
||||
app := ui.NewApp(cfg)
|
||||
if _, err := tea.NewProgram(app, tea.WithAltScreen()).Run(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "ui error:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user