2023-03-15 02:04:48 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
2023-06-03 07:18:47 -07:00
|
|
|
"codeberg.org/pronounscc/pronouns.cc/backend"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/backend/exporter"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/backend/prns"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/backend/server"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/scripts/cleandb"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/scripts/genid"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/scripts/genkey"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/scripts/migrate"
|
|
|
|
"codeberg.org/pronounscc/pronouns.cc/scripts/seeddb"
|
2023-08-17 09:49:32 -07:00
|
|
|
"codeberg.org/pronounscc/pronouns.cc/scripts/snowflakes"
|
2023-03-15 02:04:48 -07:00
|
|
|
"github.com/urfave/cli/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
var app = &cli.App{
|
|
|
|
HelpName: "pronouns.cc",
|
|
|
|
Usage: "Pronoun card website and API",
|
|
|
|
Version: server.Tag,
|
|
|
|
Commands: []*cli.Command{
|
|
|
|
backend.Command,
|
2023-03-15 07:24:51 -07:00
|
|
|
exporter.Command,
|
2023-06-02 18:06:26 -07:00
|
|
|
prns.Command,
|
2023-03-15 02:04:48 -07:00
|
|
|
{
|
|
|
|
Name: "database",
|
|
|
|
Aliases: []string{"db"},
|
|
|
|
Usage: "Manage the database",
|
|
|
|
Subcommands: []*cli.Command{
|
|
|
|
migrate.Command,
|
|
|
|
seeddb.Command,
|
|
|
|
cleandb.Command,
|
2023-08-17 09:49:32 -07:00
|
|
|
snowflakes.Command,
|
2023-03-15 02:04:48 -07:00
|
|
|
},
|
|
|
|
},
|
2023-05-10 16:13:32 -07:00
|
|
|
{
|
|
|
|
Name: "generate",
|
|
|
|
Aliases: []string{"gen"},
|
|
|
|
Usage: "Generate various strings",
|
|
|
|
Subcommands: []*cli.Command{
|
|
|
|
genid.Command,
|
|
|
|
genkey.Command,
|
|
|
|
},
|
|
|
|
},
|
2023-03-15 02:04:48 -07:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
err := app.Run(os.Args)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|