sources

package
v0.0.0-...-c34d6d1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetData

func GetData(sourcesMap map[string]schema.Record) map[string]schema.Data

TODO: make sourcesMap a global so we don't keep passing large maps in parameters TODO: should return map[string]schema.Data so we have control over the IDs

Types

type Book

type Book struct {
	ASIN       string      `json:"asin"`
	Authors    string      `json:"authors"`
	Highlights []Highlight `json:"highlights"`
	Title      string      `json:"title"`
}

define the schemas here because they're only applicable to the kindle file

type EpisodeXML

type EpisodeXML struct {
	Title       string `xml:"title"`
	Description string `xml:"description"`
	Link        string `xml:"link"`
}

type Highlight

type Highlight struct {
	Text       string      `json:"text"`
	IsNoteOnly bool        `json:"isNoteOnly"`
	Location   Location    `json:"location"`
	Note       interface{} `json:"note"`
}

type List

type List struct {
	Key  string   `json:"key"`
	Data []string `json:"data"`
	//rule represents markdown of what a unit of the list looks like
	Rule string `json:"rule"`
}

type Location

type Location struct {
	URL   string `json:"url"`
	Value int    `json:"value"`
}

type RSS

type RSS struct {
	Title       string       `xml:"channel>title"`
	Description string       `xml:"channel>description"`
	Episodes    []EpisodeXML `xml:"channel>item"`
}

Jump to

Keyboard shortcuts

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