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) {
|
func TestJSONRoot(t *testing.T) {
|
||||||
root := Root{
|
root := Root{
|
||||||
Todo: []Todo{Todo{Todo: "todo", Detail: "detail", Schedule: "teehee", TS: 1}},
|
Todo: []Todo{Todo{Todo: "todo", Details: "detail", Schedule: "teehee", TS: 1}},
|
||||||
Scheduled: []Todo{Todo{Todo: "scheduled", Detail: "detail", Schedule: "teehee", TS: 1}},
|
Scheduled: []Todo{Todo{Todo: "scheduled", Details: "detail", Schedule: "teehee", TS: 1}},
|
||||||
Done: []Todo{Todo{Todo: "done", Detail: "detail", Schedule: "teehee", TS: 1}},
|
Done: []Todo{Todo{Todo: "done", Details: "detail", Schedule: "teehee", TS: 1}},
|
||||||
}
|
}
|
||||||
var root2 Root
|
var root2 Root
|
||||||
if b, err := json.Marshal(root); err != nil {
|
if b, err := json.Marshal(root); err != nil {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
type Todo struct {
|
type Todo struct {
|
||||||
Todo string
|
Todo string
|
||||||
Detail string `yaml:",omitempty"`
|
Details string `yaml:",omitempty"`
|
||||||
TS TS `yaml:",omitempty"`
|
TS TS `yaml:",omitempty"`
|
||||||
Schedule Schedule `yaml:",omitempty"`
|
Schedule Schedule `yaml:",omitempty"`
|
||||||
Tags string `yaml:",omitempty"`
|
Tags string `yaml:",omitempty"`
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ func TestJSONTodo(t *testing.T) {
|
||||||
todo := func() Todo {
|
todo := func() Todo {
|
||||||
return Todo{
|
return Todo{
|
||||||
Todo: "todo",
|
Todo: "todo",
|
||||||
Detail: "detail",
|
Details: "detail",
|
||||||
TS: TS(1),
|
TS: TS(1),
|
||||||
Schedule: Schedule("schedule"),
|
Schedule: Schedule("schedule"),
|
||||||
}
|
}
|
||||||
|
|
@ -68,7 +68,7 @@ todo: my full task here
|
||||||
if err := yaml.Unmarshal([]byte(`
|
if err := yaml.Unmarshal([]byte(`
|
||||||
todo:
|
todo:
|
||||||
todo: the todo part of my task
|
todo: the todo part of my task
|
||||||
detail: whatever
|
details: whatever
|
||||||
schedule: "* * * * *"
|
schedule: "* * * * *"
|
||||||
`), &littleRoot); err != nil {
|
`), &littleRoot); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|
@ -76,7 +76,7 @@ todo:
|
||||||
if littleRoot.Todo.Todo != "the todo part of my task" {
|
if littleRoot.Todo.Todo != "the todo part of my task" {
|
||||||
t.Fatal(littleRoot)
|
t.Fatal(littleRoot)
|
||||||
}
|
}
|
||||||
if littleRoot.Todo.Detail != "whatever" {
|
if littleRoot.Todo.Details != "whatever" {
|
||||||
t.Fatal(littleRoot)
|
t.Fatal(littleRoot)
|
||||||
}
|
}
|
||||||
if littleRoot.Todo.Schedule != "* * * * *" {
|
if littleRoot.Todo.Schedule != "* * * * *" {
|
||||||
|
|
@ -114,14 +114,14 @@ func TestMarshalTodo(t *testing.T) {
|
||||||
|
|
||||||
t.Run(`struct should return struct`, func(t *testing.T) {
|
t.Run(`struct should return struct`, func(t *testing.T) {
|
||||||
var todo Todo
|
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)
|
t.Fatal(err)
|
||||||
} else if err := yaml.Unmarshal(b, &todo); err != nil {
|
} else if err := yaml.Unmarshal(b, &todo); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
} else if todo.Todo != "a" {
|
} else if todo.Todo != "a" {
|
||||||
t.Fatal(todo.Todo)
|
t.Fatal(todo.Todo)
|
||||||
} else if todo.Detail != "b" {
|
} else if todo.Details != "b" {
|
||||||
t.Fatal(todo.Detail)
|
t.Fatal(todo.Details)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
20
todo.yaml
20
todo.yaml
|
|
@ -1,14 +1,26 @@
|
||||||
todo:
|
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
|
- todo: ez edit on many platforms, even offline and mobile
|
||||||
subtasks:
|
details: |
|
||||||
- mobile view + complete method
|
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:
|
done:
|
||||||
- todo: YAML based todo
|
- todo: YAML based todo
|
||||||
detail:
|
details:
|
||||||
because goddamnit a year of this shit
|
because goddamnit a year of this shit
|
||||||
isn't significant on disk or in RAM for vim
|
isn't significant on disk or in RAM for vim
|
||||||
- todo: yaml based todo for plaintext
|
- 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
|
- ez edit, start on many platforms
|
||||||
- defer
|
- defer
|
||||||
- schedule
|
- schedule
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue