main.go 499 B

1234567891011121314151617181920212223242526
  1. package main
  2. import (
  3. "flag"
  4. "fmt"
  5. "os"
  6. itashi "git.aetherial.dev/aeth/itashi/pkg"
  7. tea "github.com/charmbracelet/bubbletea"
  8. )
  9. func main() {
  10. addtask := flag.Bool("add", false, "add a task to the shelf")
  11. flag.Parse()
  12. shelf := itashi.NewFilesystemShelf(itashi.FS_SAVE_LOCATION)
  13. if *addtask {
  14. itashi.AddTaskPrompt(shelf)
  15. os.Exit(0)
  16. }
  17. p := tea.NewProgram(itashi.InitialModel())
  18. if _, err := p.Run(); err != nil {
  19. fmt.Printf("Alas, there's been an error: %v", err)
  20. os.Exit(1)
  21. }
  22. }