summaryrefslogtreecommitdiff
path: root/model.go
diff options
context:
space:
mode:
Diffstat (limited to 'model.go')
-rw-r--r--model.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/model.go b/model.go
index 059cfd2..c796e98 100644
--- a/model.go
+++ b/model.go
@@ -2,11 +2,9 @@ package main
import (
"encoding/csv"
- "fmt"
"os"
"os/exec"
"strings"
- "time"
tea "charm.land/bubbletea/v2"
)
@@ -76,36 +74,3 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}
return m, nil
}
-
-func (m model) View() tea.View {
- s := "Unpublished drafts of this Hugo site:\n\n"
-
- for i, choice := range m.choices {
- if i == 0 {
- continue
- }
-
- cursor := " " // no cursor
- if m.cursor == i {
- cursor = ">"
- }
-
- checked := " " // not checked
- if _, ok := m.selected[i]; ok {
- checked = "x"
- }
-
- title := choice[2]
- t, err := time.Parse(time.RFC3339, choice[3])
- if err != nil {
-
- }
- datetime := t.Format("2006-01-02 15:04")
-
- s += fmt.Sprintf("%s [%s] %s \t %s\n", cursor, checked, datetime, title)
- }
-
- s += "\n[q] quit | [Enter] edit | [SPACE] select | [↑/k] up | [↓/j] down\n"
-
- return tea.NewView(s)
-}