Documentation ¶
Index ¶
- Variables
- func CheckIsShelfURL(checkURL string) bool
- func FilterSeriesTitleFromSeriesText(seriesText string) string
- func GenerateShelfToCrawlEntry(shelfURL string) dtos.ShelfToCrawl
- func GenerateShelfToCrawlEntryAndSave(shelfURL string) dtos.ShelfToCrawl
- func GetAvailableBooksFromSearchResult(searchResults []dtos.EnchancedSearchResult) []dtos.AvailableBook
- func GetBooksFromShelf(shelfURL string, shelfStats chan<- int, ...) []dtos.BasicGoodReadsBook
- func GetBooksFromShelves(shelveURLs []string, shelfStats chan<- int, ...) []dtos.BasicGoodReadsBook
- func GetPreviewForShelf(shelfURL string) ([]dtos.BasicGoodReadsBook, int)
- func GetSeriesDetails(bookInSeries dtos.BasicGoodReadsBook) dtos.Series
- func GetSeriesDetailsFromLink(seriesLink string, seriesDetailsChan chan<- dtos.Series) dtos.Series
- func GetSeriesLink(bookInSeries dtos.BasicGoodReadsBook) string
- func SearchGoodreads(bookPurchaseInfo dtos.TheBookshopBook) (bool, dtos.BasicGoodReadsBook)
- func SetLogger(newLogger *zap.Logger)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SLEEP_DURATION = time.Duration(1 * time.Second) GOODREADS_BASE_URL = "https://goodreads.com" )
View Source
var ( // There are five spaces between a books // title and its series information if // the series information is given TITLE_AND_SERIES_INFO_SEPERATOR = regexp.MustCompile("[ ]{3,}") NUMBER_MATCH = regexp.MustCompile("[0-9]{1,}") ONLY_NUMBERS = regexp.MustCompile(`([0-9]+)`) // Goodreads returns 30 books per page BOOK_COUNT_PER_PAGE = 30 // Base URL that book links are built on GOODREADS_BASE_BOOK_URL = "https://www.goodreads.com" // Crude to check if a roughly valid // shelf URL is being queried GOODREADS_SHELF_URL_PREFIX = GOODREADS_BASE_BOOK_URL + "/review/list/" )
Functions ¶
func CheckIsShelfURL ¶
func GenerateShelfToCrawlEntry ¶
func GenerateShelfToCrawlEntry(shelfURL string) dtos.ShelfToCrawl
func GenerateShelfToCrawlEntryAndSave ¶
func GenerateShelfToCrawlEntryAndSave(shelfURL string) dtos.ShelfToCrawl
func GetAvailableBooksFromSearchResult ¶
func GetAvailableBooksFromSearchResult(searchResults []dtos.EnchancedSearchResult) []dtos.AvailableBook
func GetBooksFromShelf ¶
func GetBooksFromShelf(shelfURL string, shelfStats chan<- int, booksFoundFromGoodReadsChan chan<- dtos.BasicGoodReadsBook) []dtos.BasicGoodReadsBook
func GetBooksFromShelves ¶
func GetBooksFromShelves(shelveURLs []string, shelfStats chan<- int, booksFoundFromGoodReadsChan chan<- dtos.BasicGoodReadsBook) []dtos.BasicGoodReadsBook
func GetPreviewForShelf ¶
func GetPreviewForShelf(shelfURL string) ([]dtos.BasicGoodReadsBook, int)
func GetSeriesDetails ¶
func GetSeriesDetails(bookInSeries dtos.BasicGoodReadsBook) dtos.Series
func GetSeriesLink ¶
func GetSeriesLink(bookInSeries dtos.BasicGoodReadsBook) string
func SearchGoodreads ¶
func SearchGoodreads(bookPurchaseInfo dtos.TheBookshopBook) (bool, dtos.BasicGoodReadsBook)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.