change detail to details, more ideas for howto mobile and safe
parent
141a374441
commit
cb0f268454
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
20
todo.yaml
20
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue