-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
119 lines (115 loc) · 2.71 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package main
import (
"errors"
"log"
"os"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "vulcan",
Usage: "manage your personal wiki",
Commands: []*cli.Command{
{
Name: "edit",
Usage: "edit a wiki page",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "shell",
Usage: "run an interactive shell in the wiki repo",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "quick",
Aliases: []string{"q"},
Usage: "Edit quicknotes",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "git",
Usage: "run a git command in the wiki repo",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "ls",
Usage: "list all wiki pages matching optional pattern",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "sql",
Usage: "run an SQL query on the wiki database",
Action: func(c *cli.Context) error {
// TODO implement me
// implement using a virtual table
// add row-level ACLs later? https://sqlite.org/forum/info/2e4b58ca45b0de363d3d652fc7ebcfed951daa8b0e585187df92b37a229d5dc5
return errors.New("not implemented")
},
},
{
Name: "log",
Usage: "edit logbook",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "mv",
Usage: "move a wiki page and update all links",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "rm",
Usage: "remove a wiki page and update all links",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "ai",
Usage: "ai tools for your wiki",
Subcommands: []*cli.Command{
{
Name: "summarize",
Usage: "summarize wiki pages matching pattern",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
{
Name: "ask",
Usage: "ask a question to your wiki, using pages specified by pattern or search term as context",
Action: func(c *cli.Context) error {
// TODO implement me
return errors.New("not implemented")
},
},
},
},
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}