2024-01-19 03:33:37 +00:00
|
|
|
package main
|
2024-01-19 04:29:12 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
"fmt"
|
2024-01-22 20:43:46 +00:00
|
|
|
"os"
|
2024-01-19 04:29:12 +00:00
|
|
|
|
|
|
|
"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()
|
|
|
|
}
|
2024-01-22 20:43:46 +00:00
|
|
|
feed, err := rss.GenerateRss(*siteUrl, *siteTitle, *siteDesc, flag.Args()...)
|
|
|
|
if err != nil {
|
|
|
|
os.Stderr.WriteString(err.Error())
|
|
|
|
}
|
|
|
|
fmt.Println(feed)
|
2024-01-19 04:29:12 +00:00
|
|
|
}
|
|
|
|
|