package main import ( "flag" "fmt" "os" "git.32bit.cafe/yequari/rss-gen/feed" ) func main() { siteUrl := flag.String("url", "", "url of site") siteTitle := flag.String("title", "", "site title") siteDesc := flag.String("desc", "", "site description") flag.Parse() if *siteUrl == "" || *siteTitle == "" || *siteDesc == "" { flag.PrintDefaults() os.Exit(1) } feedInfo, err := feed.NewFeedInfo(*siteTitle, *siteUrl, *siteDesc, "", flag.Args()...) if err != nil { os.Stderr.WriteString(err.Error()) os.Exit(1) } fmt.Println(feedInfo.GenerateRSS()) }