sitelib

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package sitelib provides a library for siren sites

Index

Constants

This section is empty.

Variables

View Source
var IconNames = []string{
	"siren",
	"fanclub",
	"instagram",
	"twitter",
	"onlyfans",
	"amazon",
	"lovense",
	"gift",
	"pornhub",
	"dmca",
	"allmylinks",
	"onemylink",
	"linktree",
	"fancentro",
	"frisk",
	"fansly",
	"throne",
	"mail",
	"snapchat",
	"telegram",
	"whatsapp",
	"youtube",
	"tiktok",
	"reddit",
	"twitch",
	"discord",
	"manyvids",
	"avn",
}

IconNames represents all the icons in chic

Functions

This section is empty.

Types

type Config

type Config struct {
	DBPath        string `yaml:"db_path"`
	ListenAddress string `yaml:"listen_address"`
	BaseURL       string `yaml:"base_url"`
	Files         string `yaml:"files"`
	BaseDomain    string `yaml:"base_domain"`
	Debug         bool   `yaml:"debug"`
}

Config represents site or converter config

func ReadConfig

func ReadConfig(path string) Config

ReadConfig reads config file and parses it

type Icon

type Icon struct {
	VersionedName    string
	NotVersionedName string
	Width            float64
	Height           float64
}

Icon represents all required icon's fields

type Pack

type Pack struct {
	HumanName            string   `json:"human_name"`
	Scale                int      `json:"scale"`
	ChaturbateIconsScale *int     `json:"chaturbate_icons_scale"`
	VGap                 *int     `json:"vgap"`
	HGap                 *int     `json:"hgap"`
	Disable              bool     `json:"disable"`
	Version              int      `json:"version"`
	FinalType            string   `json:"final_type"`
	HiddenIcons          []string `json:"hidden_icons"`
	Timestamp            int64    `json:"timestamp"`
	InputType            string   `json:"input_type"`

	Name         string          `json:"-"`
	SourceIcons  map[string]Icon `json:"-"`
	InputIcons   map[string]Icon `json:"-"`
	FinalIcons   map[string]Icon `json:"-"`
	VisibleIcons map[string]bool `json:"-"`
}

Pack represents an icon pack

func ParsePacks added in v1.1.0

func ParsePacks(dir string) []Pack

ParsePacks parses icons packs

type SVG added in v1.2.1

type SVG struct {
	Width  string `xml:"width,attr"`
	Height string `xml:"height,attr"`
}

SVG represents the structure of an SVG file

Jump to

Keyboard shortcuts

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