From cb0f268454d6eca103e9662cea63d86cc3a6278e Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Fri, 31 Dec 2021 21:17:37 -0500 Subject: [PATCH] change detail to details, more ideas for howto mobile and safe --- pttodo/root_test.go | 6 +++--- pttodo/todo.go | 2 +- pttodo/todo_test.go | 12 ++++++------ todo.yaml | 20 ++++++++++++++++---- 4 files changed, 26 insertions(+), 14 deletions(-) diff --git a/pttodo/root_test.go b/pttodo/root_test.go index c706c5b..da2df78 100644 --- a/pttodo/root_test.go +++ b/pttodo/root_test.go @@ -10,9 +10,9 @@ import ( func TestJSONRoot(t *testing.T) { root := Root{ - Todo: []Todo{Todo{Todo: "todo", Detail: "detail", Schedule: "teehee", TS: 1}}, - Scheduled: []Todo{Todo{Todo: "scheduled", Detail: "detail", Schedule: "teehee", TS: 1}}, - Done: []Todo{Todo{Todo: "done", Detail: "detail", Schedule: "teehee", TS: 1}}, + Todo: []Todo{Todo{Todo: "todo", Details: "detail", Schedule: "teehee", TS: 1}}, + Scheduled: []Todo{Todo{Todo: "scheduled", Details: "detail", Schedule: "teehee", TS: 1}}, + Done: []Todo{Todo{Todo: "done", Details: "detail", Schedule: "teehee", TS: 1}}, } var root2 Root if b, err := json.Marshal(root); err != nil { diff --git a/pttodo/todo.go b/pttodo/todo.go index 12241f2..04a11b9 100644 --- a/pttodo/todo.go +++ b/pttodo/todo.go @@ -7,7 +7,7 @@ import ( type Todo struct { Todo string - Detail string `yaml:",omitempty"` + Details string `yaml:",omitempty"` TS TS `yaml:",omitempty"` Schedule Schedule `yaml:",omitempty"` Tags string `yaml:",omitempty"` diff --git a/pttodo/todo_test.go b/pttodo/todo_test.go index d620c71..3645f18 100644 --- a/pttodo/todo_test.go +++ b/pttodo/todo_test.go @@ -13,7 +13,7 @@ func TestJSONTodo(t *testing.T) { todo := func() Todo { return Todo{ Todo: "todo", - Detail: "detail", + Details: "detail", TS: TS(1), Schedule: Schedule("schedule"), } @@ -68,7 +68,7 @@ todo: my full task here if err := yaml.Unmarshal([]byte(` todo: todo: the todo part of my task - detail: whatever + details: whatever schedule: "* * * * *" `), &littleRoot); err != nil { t.Fatal(err) @@ -76,7 +76,7 @@ todo: if littleRoot.Todo.Todo != "the todo part of my task" { t.Fatal(littleRoot) } - if littleRoot.Todo.Detail != "whatever" { + if littleRoot.Todo.Details != "whatever" { t.Fatal(littleRoot) } if littleRoot.Todo.Schedule != "* * * * *" { @@ -114,14 +114,14 @@ func TestMarshalTodo(t *testing.T) { t.Run(`struct should return struct`, func(t *testing.T) { var todo Todo - if b, err := yaml.Marshal(Todo{Todo: "a", Detail: "b"}); err != nil { + if b, err := yaml.Marshal(Todo{Todo: "a", Details: "b"}); err != nil { t.Fatal(err) } else if err := yaml.Unmarshal(b, &todo); err != nil { t.Fatal(err) } else if todo.Todo != "a" { t.Fatal(todo.Todo) - } else if todo.Detail != "b" { - t.Fatal(todo.Detail) + } else if todo.Details != "b" { + t.Fatal(todo.Details) } }) } diff --git a/todo.yaml b/todo.yaml index ed75b1f..3ddf38e 100644 --- a/todo.yaml +++ b/todo.yaml @@ -1,14 +1,26 @@ todo: +- todo: when to run scheduled modifier? like, syncthing could have conflicts if I modify only file on remote + details: | + - if it's a web ui hook or somethin, then it'd only have file conflict if I modify without waiting + - but thats a step back from current todo solution + - todo: ez edit on many platforms, even offline and mobile - subtasks: - - mobile view + complete method + details: | + mobile view + complete method + collab editing of file prob resolves mobile and other stuff... + has issue of rich text ass bullshit and still having to type/indent + web server access to ops + is a web ui for mobile best solution? + let git be smart-ish and keep latest? would provide versioning OOTB without touching raw + +- todo: crontab -e style editing to ensure good syntax done: - todo: YAML based todo - detail: + details: because goddamnit a year of this shit isn't significant on disk or in RAM for vim - todo: yaml based todo for plaintext - detail: a year isnt even a mb + details: a year isnt even a mb - ez edit, start on many platforms - defer - schedule