Rework fixers to decide what to use and move dehtmlify process in them.
Added githubv fixer.
This commit is contained in:
+1
-9
@@ -7,7 +7,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/mmcdole/gofeed"
|
||||
"github.com/prodigeris/html2text"
|
||||
"go.dev.pztrn.name/rsser/fixers"
|
||||
)
|
||||
|
||||
@@ -61,14 +60,7 @@ func (r *RSS) Parse() {
|
||||
continue
|
||||
}
|
||||
|
||||
description, err := html2text.FromString(item.Description, html2text.Options{
|
||||
PrettyTables: true,
|
||||
})
|
||||
if err != nil {
|
||||
description = item.Description
|
||||
}
|
||||
|
||||
title, fixedDescription := fixers.Fix(feedURL.Host, item.Title, description)
|
||||
title, fixedDescription := fixers.Fix(feedURL.Host, item)
|
||||
|
||||
for _, output := range r.outputs {
|
||||
if feed.Output == output.Name() {
|
||||
|
||||
Reference in New Issue
Block a user