This commit is contained in:
yequari 2024-03-03 14:04:59 -07:00
parent 6ada6f3ef5
commit 55fd870c81
1 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import (
"fmt" "fmt"
"os" "os"
"git.32bit.cafe/yequari/rss-gen/rss" "git.32bit.cafe/yequari/rss-gen/feed"
) )
func main() { func main() {
@ -16,11 +16,13 @@ func main() {
flag.Parse() flag.Parse()
if *siteUrl == "" || *siteTitle == "" || *siteDesc == "" { if *siteUrl == "" || *siteTitle == "" || *siteDesc == "" {
flag.PrintDefaults() flag.PrintDefaults()
os.Exit(1)
} }
feed, err := rss.GenerateRss(*siteUrl, *siteTitle, *siteDesc, flag.Args()...) feedInfo, err := feed.NewFeedInfo(*siteTitle, *siteUrl, *siteDesc, "", flag.Args()...)
if err != nil { if err != nil {
os.Stderr.WriteString(err.Error()) os.Stderr.WriteString(err.Error())
os.Exit(1)
} }
fmt.Println(feed) fmt.Println(feedInfo.GenerateRSS())
} }