export

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Export all weeks to the weeks content directory

Index

Constants

View Source
const (
	FirstWeek = "2017-12-07"
)

Variables

View Source
var FeedMappers []FeedMapper
View Source
var PostMappers []PostMapper
View Source
var (
	WeeksContentDir = "weeks"
)

Functions

func BulletinExport

func BulletinExport(exp Map, feed feeds.Feed, post posts.Post) error

func ExportBTCAddresses

func ExportBTCAddresses() error

func ExportWeeks

func ExportWeeks() error

func NewsletterPostLayout

func NewsletterPostLayout(exp Map, feed feeds.Feed, post posts.Post) error

func RFCExport

func RFCExport(exp Map, feed feeds.Feed, post posts.Post) error

TODO: This happend in the main export file

func RegisterFeedMapper

func RegisterFeedMapper(mapper FeedMapper)

func RegisterPostMapper

func RegisterPostMapper(mapper PostMapper)

func ReleaseExport

func ReleaseExport(exp Map, feed feeds.Feed, post posts.Post) error

Types

type FeedExport

type FeedExport struct {
	Name       string           `json:"name"`
	Section    string           `json:"section"`
	Categories types.StringList `json:"categories"`
	Posts      PostMap          `json:"posts"`
}

type FeedMapper

type FeedMapper func(Map, feeds.Feed) error

type HugoExporter

type HugoExporter struct{}

func NewHugoExporter

func NewHugoExporter() HugoExporter

func (HugoExporter) Export

func (he HugoExporter) Export(feed feeds.Feed)

Runs in goroutine

func (HugoExporter) Handle

func (he HugoExporter) Handle(feed feeds.Feed) error

type Map

type Map map[string]interface{}

type PostExport

type PostExport struct {
	ID        int64     `json:"id"`
	Title     string    `json:"title"`
	Link      string    `json:"link"`
	Published time.Time `json:"published"`
	Content   string    `json:"content"`
}

Exported version of a post

type PostMap

type PostMap map[int64]Map

type PostMapper

type PostMapper func(Map, feeds.Feed, posts.Post) error

type WeekData

type WeekData struct {
	Title string
	Date  time.Time
}

Jump to

Keyboard shortcuts

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