internal

package
v0.0.0-...-501514a Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BASE_URL       = "https://danbooru.donmai.us"
	POSTS_PER_PAGE = 200
	LOGIN_NAME     = os.Getenv("DANBOORU_LOGIN")
	API_KEY        = os.Getenv("DANBOORU_API_KEY")
)

Functions

func FetchPostsFromPage

func FetchPostsFromPage(totalPageAmount int, client *fasthttp.Client) []types.Post

Loops over all pages and returns a list of all posts

Uses a Progress Bar to show the progress to the user

func GetTotalPages

func GetTotalPages(tags []string) int

Get the total amount of pages for the given tags

This is used to determine how many pages worth of posts to fetch

func IsGoldMember

func IsGoldMember() bool

func PrintHelpMessage

func PrintHelpMessage()

func SegmentSlice

func SegmentSlice[T any](slice []T, n int) [][]int

Chunks a slice into n sub-slices of roughly equal size (last one may be smaller)

These sub-slices do not contain elements from the original slice, but rather the start and end indexes within the original slice

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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