tbf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseURL = "https://techbookfest.org"
View Source
var URLMap = map[string]string{
	"latest": "https://raw.githubusercontent.com/mpppk/tbf/master/data/latest_circles.csv",
	"tbf4":   "https://raw.githubusercontent.com/mpppk/tbf/master/data/tbf4_circles.csv",
}

Functions

func CircleDetailToHeaders

func CircleDetailToHeaders(circleDetail *CircleDetail) (headers []string)

func CircleDetailToLine

func CircleDetailToLine(headers []string, circleDetail *CircleDetail) ([]string, error)

func GetCSVURL added in v0.0.2

func GetCSVURL(source string) (string, bool)

Types

type Circle

type Circle struct {
	DetailURL string
	Space     string
	Name      string
	Penname   string
	Genre     string
}

type CircleDetail

type CircleDetail struct {
	Circle          `structs:",flatten" mapstructure:",squash"`
	ImageURL        string
	WebURL          string
	GenreFreeFormat string
}

func LineToCircleDetail

func LineToCircleDetail(headers, line []string) (*CircleDetail, error)

func NewCircleDetailFromMap

func NewCircleDetailFromMap(m map[string]string) (*CircleDetail, error)

type Source added in v0.0.2

type Source struct {
	Url      string
	FileName string
}

func NewSource added in v0.0.2

func NewSource(sourcePath string) *Source

Jump to

Keyboard shortcuts

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