convert

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package convert contains Emissary-specific conversions to and from various export formats. TODO: LOW: These should probably be folded in to their respective adapters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivityPubAttributedTo added in v0.6.0

func ActivityPubAttributedTo(document streams.Document) model.PersonLink

ActivityPubAttributedTo generates a model.PersonLink for the first valid record in AttributedTo

func AnyToMicroformat

func AnyToMicroformat(value any) *microformats.Microformat

func IteratorToJSonFeed

func IteratorToJSonFeed(url string, title string, description string, it data.Iterator) jsonfeed.Feed

func JsonFeedToActivity

func JsonFeedToActivity(feed jsonfeed.Feed, item jsonfeed.Item) model.Message

func JsonFeedToAuthor

func JsonFeedToAuthor(feed jsonfeed.Feed, item jsonfeed.Item) model.PersonLink

func JsonFeedToContentHTML

func JsonFeedToContentHTML(item jsonfeed.Item) string

func MicroformatPropertyToString

func MicroformatPropertyToString(entry *microformats.Microformat, names ...string) string

func MicroformatToAuthor

func MicroformatToAuthor(entry *microformats.Microformat) model.PersonLink

func MicroformatToMessage

func MicroformatToMessage(feed *microformats.Microformat, entry *microformats.Microformat) model.Message

func RSSToActivity

func RSSToActivity(feed *gofeed.Feed, rssItem *gofeed.Item) mapof.Any

RSSToActivity populates an Activity object from a gofeed.Feed and gofeed.Item

func SanitizeHTML

func SanitizeHTML(value string) string

func SanitizeText

func SanitizeText(value string) string

func StreamToGorillaFeed

func StreamToGorillaFeed(stream model.Stream) *feeds.Item

func StreamToJsonFeed

func StreamToJsonFeed(stream model.Stream) jsonfeed.Item

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL