1234567891011121314151617181920212223242526 |
- package main
- import (
- "flag"
- "fmt"
- "os"
- itashi "git.aetherial.dev/aeth/itashi/pkg"
- tea "github.com/charmbracelet/bubbletea"
- )
- func main() {
- addtask := flag.Bool("add", false, "add a task to the shelf")
- flag.Parse()
- shelf := itashi.NewFilesystemShelf(itashi.FS_SAVE_LOCATION)
- if *addtask {
- itashi.AddTaskPrompt(shelf)
- os.Exit(0)
- }
- p := tea.NewProgram(itashi.InitialModel())
- if _, err := p.Run(); err != nil {
- fmt.Printf("Alas, there's been an error: %v", err)
- os.Exit(1)
- }
- }
|