示例#1
0
func main() {
	config.LoadConfigFile("config.toml")

	bin := comandante.New("folkpocket", "Read folklore.org in pocket")
	bin.IncludeHelp()

	// scrape command
	scrapeCmd := comandante.NewCommand("scrape", "Scrape folklore.org story URLs and save them in the database.", cmds.ScrapeAction)
	scrapeCmd.Documentation = cmds.ScrapeDoc
	bin.RegisterCommand(scrapeCmd)

	// serve command
	if err := bin.Run(); err != nil {
		fmt.Fprintln(os.Stderr, err)
	}
}
示例#2
0
func (s *saveUrlSuite) SetUpSuite(c *C) {
	os.Setenv("FOLKPOCKET_ENV", "test")
	config.LoadConfigFile("../config.toml")
}