package main

import (
	"os"

	"gogs.inhome.blapointe.com/ana-ledger/cmd/cli"
	"gogs.inhome.blapointe.com/ana-ledger/cmd/http"
)

func main() {
	switch os.Args[1] {
	case "http":
		os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
		http.Main()
	case "cli":
		os.Args = append([]string{os.Args[0]}, os.Args[2:]...)
		cli.Main()
	case "shared":
		files := os.Args[2:]
		os.Args = []string{os.Args[0], "cli"}
		for _, f := range files {
			os.Args = append(os.Args, "-f", f)
		}
		os.Args = append(os.Args,
			"-w=^Housey",
			"--depth=1",
			"--usd",
			"-n",
			"bal", "^Bel", "^Zach",
		)
		main()
	}
}
