2023-03-15 10:04:48 +01:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend"
|
2023-03-15 15:24:51 +01:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/exporter"
|
2023-03-15 10:04:48 +01:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/backend/server"
|
|
|
|
"codeberg.org/u1f320/pronouns.cc/scripts/cleandb"
|
2023-05-11 01:13:32 +02:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/scripts/genid"
|
|
|
|
"codeberg.org/u1f320/pronouns.cc/scripts/genkey"
|
2023-03-15 10:04:48 +01:00
|
|
|
"codeberg.org/u1f320/pronouns.cc/scripts/migrate"
|
|
|
|
"codeberg.org/u1f320/pronouns.cc/scripts/seeddb"
|
|
|
|
"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 15:24:51 +01:00
|
|
|
exporter.Command,
|
2023-03-15 10:04:48 +01:00
|
|
|
{
|
|
|
|
Name: "database",
|
|
|
|
Aliases: []string{"db"},
|
|
|
|
Usage: "Manage the database",
|
|
|
|
Subcommands: []*cli.Command{
|
|
|
|
migrate.Command,
|
|
|
|
seeddb.Command,
|
|
|
|
cleandb.Command,
|
|
|
|
},
|
|
|
|
},
|
2023-05-11 01:13:32 +02:00
|
|
|
{
|
|
|
|
Name: "generate",
|
|
|
|
Aliases: []string{"gen"},
|
|
|
|
Usage: "Generate various strings",
|
|
|
|
Subcommands: []*cli.Command{
|
|
|
|
genid.Command,
|
|
|
|
genkey.Command,
|
|
|
|
},
|
|
|
|
},
|
2023-03-15 10:04:48 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
err := app.Run(os.Args)
|
|
|
|
if err != nil {
|
|
|
|
fmt.Println(err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|