-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
43 lines (36 loc) · 957 Bytes
/
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
package main
import (
"log"
"github.com/Nirespire/swn/content"
"github.com/Nirespire/swn/content/npc"
"github.com/Nirespire/swn/content/player/name"
"github.com/Nirespire/swn/modules/gpt"
"github.com/alecthomas/kong"
"github.com/davecgh/go-spew/spew"
)
func main() {
var CLI struct {
Npc struct {
Portrait bool `help:"Generate a portrait image" default:true`
Stats bool `help:"Generates a stat block for the NPC" default:false`
} `cmd:"" help:"Generates content for NPCs"`
Player struct {
} `cmd:"" help:"Generates content for Player Characters"`
}
ctx := kong.Parse(&CLI)
switch ctx.Command() {
case "npc":
npc := npc.NPC{}
npc.RandomRoll()
spew.Dump(npc)
req := gpt.ImageRequest{npc.GenerateImagePrompt()}
imageURL := req.GenerateImage()
log.Println(imageURL)
case "player":
pc := content.PlayerCharacter{}
pc.RandomRoll(true, name.Any, name.None)
spew.Dump(pc)
default:
panic(ctx.Command())
}
}