gokel

package module
v0.0.0-...-b662c97 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 6 Imported by: 0

README

GoKel

A scrapper for ArchiveOfOurOwn built using Go

WIP features:

  • Pretty Printing work structs
  • Comment scraping

Documentation

Index

Constants

View Source
const (
	RatingNotRated = iota
	RatingGeneral
	RatingTeen
	RatingMature
	RatingExplicit
)
View Source
const (
	ArchiveUnknownWarnings = (1 << iota)
	ArchiveNoWarnings
	ArchiveGraphicViolence
	ArchiveMajorDeath
	ArchiveNonCon
	ArchiveUnderage
)
View Source
const (
	CategoryGen = (1 << iota)
	CategoryFM
	CategoryMM
	CategoryMulti
	CategoryOther
	CategoryFF
)
View Source
const (
	PartPreface = iota
	PartStats
	PartChapters
)

Variables

This section is empty.

Functions

func GetCategoryConstant

func GetCategoryConstant(categoryString string) (category int)

func GetRatingConstant

func GetRatingConstant(ratingString string) (rating int)

func GetWarningConstant

func GetWarningConstant(warningString string) (warning int)

func GetWork

func GetWork(workID string) (w Work, warns []Log, err error)

func GetWorkURL

func GetWorkURL(workID string) (workURL string)

func ParseChapterString

func ParseChapterString(chapterString string) (chapters int, maxChapters int, err error)

Types

type Log

type Log struct {
	WorkId   string
	WorkPart int
	Payload  string
	Severity int
}

type Work

type Work struct {
	WorkURL      string
	WorkChapters []WorkChapter
	WorkMeta
	WorkPreface
}

type WorkChapter

type WorkChapter struct {
	ChapterIndex          int
	ChapterTitle          string
	ChapterSummary        string
	ChapterBeginningNotes string
	ChapterEndingNotes    string
	ChapterContent        string
}

type WorkMeta

type WorkMeta struct {
	WorkWarnings      int
	WorkRating        int
	WorkCategory      int
	WorkFandom        []string
	WorkRelationships []string
	WorkCharacters    []string
	WorkTags          []string
	WorkLanguange     string
	WorkStats         WorkStats
}

type WorkPreface

type WorkPreface struct {
	WorkTitle          string
	WorkAuthors        []string
	WorkSummary        string
	WorkBeginningNotes string
	WorkEndingNotes    string
	WorkSkin           string
}

type WorkStats

type WorkStats struct {
	PublishedTime   string
	LastUpdated     string
	Words           int
	CurrentChapters int
	MaxChapters     int
	Kudos           int
	Bookmarks       int
	Hits            int
}

Jump to

Keyboard shortcuts

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