xkcd

package
v0.0.0-...-80f9acd Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2016 License: ISC Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	XkcdURL            string = "http://xkcd.com/"
	RemoteJSONFilename string = "info.0.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Comic

type Comic struct {
	Num        int
	SafeTitle  string `json:"safe_title"`
	Alt        string
	Img        string
	Title      string
	Transcript string
}

func FetchComic

func FetchComic(comicID int) (*Comic, error)

type Index

type Index struct {
	Items   map[string]Comic
	Latest  int
	Missing []int
}

func LoadIndex

func LoadIndex(filename string) (*Index, error)

func (*Index) RegexSearchComic

func (ind *Index) RegexSearchComic(terms []string) []Comic

func (*Index) String

func (ind *Index) String() string

func (*Index) UpdateIndex

func (ind *Index) UpdateIndex(filename string) error

Jump to

Keyboard shortcuts

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