retwt

package
v0.0.0-...-7609c90 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidTwtLine = errors.New("error: invalid twt line parsed")
)

Functions

func DecodeJSON

func DecodeJSON(data []byte) (types.Twt, error)

func DefaultTwtManager

func DefaultTwtManager()

func ExpandMentions

func ExpandMentions(opts types.FmtOpts, lookup types.FeedLookup, text string) string

ExpandMentions turns "@nick" into "@<nick URL>" if we're following the user or feed or if they exist on the local pod. Also turns @user@domain into @<user URL> as a convenient way to mention users across pods.

func ExpandTag

func ExpandTag(opts types.FmtOpts, text string) string

Turns #tag into "#<tag URL>"

func FormatMentionsAndTagsForSubject

func FormatMentionsAndTagsForSubject(text string) string

FormatMentionsAndTagsForSubject turns `@<nick URL>` into `@nick`

func NewReTwt

func NewReTwt(twter types.Twter, text string, created time.Time) *reTwt

func ParseFile

func ParseFile(r io.Reader, twter types.Twter) (*retwtFile, error)

func ParseLine

func ParseLine(line string, twter types.Twter) (twt types.Twt, err error)

func ParseTime

func ParseTime(timestr string) (tm time.Time, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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