www.byjp.me/tools/syndicate/shared/text/strip.go
JP Hastings-Spital c135910850 Working pixelfed & insta posting
Syndicate is working! Instagra & Pixelfed demonstrated with the new post attached.

Lots of TODOs, but functional enough :)
2023-11-12 07:43:08 +00:00

16 lines
339 B
Go

package text
import (
"strings"
"github.com/by-jp/www.byjp.me/tools/syndicate/shared"
strip "github.com/grokify/html-strip-tags-go"
)
func StripHTML(s string) string {
return strings.TrimSpace(strip.StripTags(s))
}
func Caption(p shared.Post) string {
return p.Title + " · " + StripHTML(p.Summary) + "\n·\nOriginal: " + p.URL
}