webweav.ing/cmd/cli/main.go

23 lines
465 B
Go
Raw Normal View History

2024-01-19 03:33:37 +00:00
package main
2024-01-19 04:29:12 +00:00
import (
"flag"
"fmt"
"git.32bit.cafe/yequari/rss-gen/rss"
)
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()
}
fmt.Println(rss.GenerateRss(*siteUrl, *siteTitle, *siteDesc, flag.Args()...))
}