doodle/cmd/doodad/main.go
Noah Petherbridge 5bf7d554f7 Add doodad.exe binary and PNG to Drawing Converter
Adds the `doodad` binary which will be a command line tool to work with
Doodads and Levels and assist with development.

The `doodad` binary has subcommands like git and the first command is
`convert` which converts between image files (PNG or BMP) and Doodle
drawing files (Level or Doodad). You can "screenshot" a level into a PNG
or you can initialize a new drawing from a PNG.
2018-10-16 12:26:41 -07:00

41 lines
701 B
Go

// doodad is the command line developer tool for Doodle.
package main
import (
"log"
"os"
"sort"
"git.kirsle.net/apps/doodle"
"git.kirsle.net/apps/doodle/cmd/doodad/commands"
"github.com/urfave/cli"
)
var Build = "N/A"
func main() {
app := cli.NewApp()
app.Name = "doodad"
app.Usage = "command line interface for Doodle"
app.Version = doodle.Version + " build " + Build
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "debug, d",
Usage: "enable debug level logging",
},
}
app.Commands = []cli.Command{
commands.Convert,
}
sort.Sort(cli.FlagsByName(app.Flags))
sort.Sort(cli.CommandsByName(app.Commands))
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}