Added html parser

This commit is contained in:
Pijus Kamandulis
2021-06-08 23:43:32 +03:00
parent d3cf54472a
commit 01f7879f7e
7 changed files with 74 additions and 5 deletions

View File

@@ -10,11 +10,13 @@ import (
var Config struct {
FeedURL string
OutputPath string
ParseHtml bool
}
// GetConfig - Returns Config object
func GetConfig() {
outputPath := flag.String("output", ".", "Output path")
parseHtml := flag.Bool("parsehtml", false, "Save content as html")
flag.Parse()
@@ -26,4 +28,5 @@ func GetConfig() {
Config.FeedURL = flag.Args()[len(args)-1]
Config.OutputPath = *outputPath
Config.ParseHtml = *parseHtml
}