compton_data

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppNavUpdates = "Updates"
	AppNavSearch  = "Search"
)
View Source
const (
	SingleItemTemplate          = "1 item"
	ManyItemsSinglePageTemplate = "{total} items"
	ManyItemsManyPagesTemplate  = "{from}-{to} out of {total} items"
)
View Source
const (
	SearchNew      = "New"
	SearchGog      = "GOG"
	SearchWishlist = "Wish"
	SearchSale     = "Sale"
)
View Source
const (
	InfoSection          = "info"
	OfferingsSection     = "offerings"
	MediaSection         = "media"
	NewsSection          = "news"
	ReceptionSection     = "reception"
	CompatibilitySection = "compatibility"
	InstallersSection    = "installers"
)
View Source
const (
	FeedTypeCommunityAnnouncement = 1
	FeedTypeOther                 = 0
)
View Source
const (
	GOGLinksProperty   = "gog-links"
	SteamLinksProperty = "steam-links"
	OtherLinksProperty = "other-links"

	SteamCommunityUrlProperty = "steam-community-url"
	SteamGuidesUrlProperty    = "steam-guides-url"

	PCGamingWikiUrlProperty = "pcgamingwiki-url"
	GOGDBUrlProperty        = "gogdb-url"
	ProtonDBUrlProperty     = "protondb-url"
	HltbUrlProperty         = "hltb-url"
	IGDBUrlProperty         = "igdb-url"
	StrategyWikiUrlProperty = "strategy-wiki-url"
	MobyGamesUrlProperty    = "moby-games-url"
	WikipediaUrlProperty    = "wikipedia-url"
	WineHQUrlProperty       = "winehq-url"
	VNDBUrlProperty         = "vndb-url"
	IGNWikiUrlProperty      = "ign-wiki-url"
	OpenCriticUrlProperty   = "opencritic-url"
	MetacriticUrlProperty   = "metacritic-url"
	WebsiteUrlProperty      = "website"
)
View Source
const GogPreservationProgramTag = "Good Old Game"

Variables

View Source
var CompatibilityColors = map[string]color.Color{
	"Platinum":    color.Green,
	"Gold":        color.Green,
	"Verified":    color.Green,
	"Silver":      color.Orange,
	"Bronze":      color.Orange,
	"Playable":    color.Orange,
	"Borked":      color.Red,
	"Unsupported": color.Red,
}
View Source
var CompatibilitySymbols = map[string]compton.Symbol{
	"Platinum":    compton.CirclePositive,
	"Gold":        compton.CirclePositive,
	"Verified":    compton.CirclePositive,
	"Silver":      compton.TriangleNeutral,
	"Bronze":      compton.TriangleNeutral,
	"Playable":    compton.TriangleNeutral,
	"Borked":      compton.CrossNegative,
	"Unsupported": compton.CrossNegative,
}
View Source
var LanguageFlags = map[string]string{
	"en":    "🇺🇸",
	"de":    "🇩🇪",
	"fr":    "🇫🇷",
	"es":    "🇪🇸",
	"ru":    "🇷🇺",
	"it":    "🇮🇹",
	"cn":    "🇨🇳",
	"jp":    "🇯🇵",
	"pl":    "🇵🇱",
	"br":    "🇧🇷",
	"ko":    "🇰🇷",
	"zh":    "🇨🇳",
	"tr":    "🇹🇷",
	"cz":    "🇨🇿",
	"pt":    "🇵🇹",
	"nl":    "🇳🇱",
	"es_mx": "🇲🇽",
	"hu":    "🇭🇺",
	"uk":    "🇺🇦",
	"ar":    "🇸🇦",
	"sv":    "🇸🇪",
	"no":    "🇳🇴",
	"da":    "🇩🇰",
	"fi":    "🇫🇮",
	"th":    "🇹🇭",
	"ro":    "🇷🇴",
	"gk":    "🇬🇷",
	"bl":    "🇧🇬",
	"sk":    "🇸🇮",
	"be":    "🇧🇾",
	"he":    "🇮🇱",
	"sb":    "🇷🇸",
	"ca":    "🇪🇸",
	"is":    "🇮🇸",
	"fa":    "🇮🇷",
	"et":    "🇪🇪",
	"id":    "🇮🇩",
	"vi":    "🇻🇳",
}

LanguageFlags contain national flags that correspond to language code. In some cases there is no obvious way to map those, attempting to use sensible option: ar, ca, fa Few options are not possible to map to countries (left as comments below)

View Source
var LanguageTitles = map[string]string{
	"en":     "English",
	"id":     "bahasa Indonesia",
	"ca":     "català",
	"cz":     "český",
	"da":     "Dansk",
	"de":     "Deutsch",
	"et":     "eesti",
	"es":     "español",
	"es_mx":  "Español (AL)",
	"fr":     "français",
	"gog_IN": "Inuktitut",
	"is":     "Íslenska",
	"it":     "italiano",
	"la":     "latine",
	"hu":     "magyar",
	"nl":     "nederlands",
	"no":     "norsk",
	"pl":     "polski",
	"pt":     "português",
	"br":     "Português do Brasil",
	"ro":     "română",
	"sk":     "slovenský",
	"fi":     "suomi",
	"sv":     "svenska",
	"vi":     "Tiếng Việt",
	"tr":     "Türkçe",
	"uk":     "yкраїнська",
	"gk":     "Ελληνικά",
	"be":     "беларуская",
	"bl":     "български",
	"ru":     "русский",
	"sb":     "Српска",
	"he":     "עברית",
	"ar":     "العربية",
	"fa":     "فارسی",
	"th":     "ไทย",
	"ko":     "한국어",
	"cn":     "中文(简体)",
	"zh":     "中文(繁體)",
	"jp":     "日本語",
}
View Source
var OperatingSystemTitles = map[string]string{
	vangogh_integration.MacOS.String():   "macOS",
	vangogh_integration.Linux.String():   "Linux",
	vangogh_integration.Windows.String(): "Windows",
}
View Source
var ProductExternalLinksProperties = []string{
	GOGLinksProperty,
	SteamLinksProperty,
	OtherLinksProperty,
}
View Source
var PropertyTitles = map[string]string{
	vangogh_integration.GogTitleProperty:         "Title",
	vangogh_integration.GogTagIdProperty:         "Account Tags",
	vangogh_integration.LocalTagsProperty:        "Local Tags",
	vangogh_integration.OperatingSystemsProperty: "OS",
	vangogh_integration.GogDevelopersProperty:    "Developers",
	vangogh_integration.GogPublishersProperty:    "Publishers",
	vangogh_integration.EnginesProperty:          "Engine",
	vangogh_integration.EnginesBuildsProperty:    "Engine Build",
	vangogh_integration.GogSeriesProperty:        "Series",
	vangogh_integration.GogGenresProperty:        "Genres",
	vangogh_integration.GogThemesProperty:        "Themes",
	vangogh_integration.GogStoreTagsProperty:     "Store Tags",
	vangogh_integration.SteamCategoriesProperty:  "Steam Categories",
	vangogh_integration.GogFeaturesProperty:      "Features",
	vangogh_integration.GogGameModesProperty:     "Game Modes",
	vangogh_integration.LanguageCodeProperty:     "Language",

	vangogh_integration.GogIsIncludedByGamesProperty: "Editions",
	vangogh_integration.GogIsRequiredByGamesProperty: "DLCs",
	vangogh_integration.GogIsModifiedByGamesProperty: "Mods",
	vangogh_integration.GogIncludesGamesProperty:     "Includes",
	vangogh_integration.GogRequiresGamesProperty:     "Requires",
	vangogh_integration.GogModifiesGamesProperty:     "Modifies",

	vangogh_integration.GogProductTypeProperty: "Product Type",

	vangogh_integration.GogUserWishlistProperty: "Wishlisted",
	vangogh_integration.GogOwnedProperty:        "Owned",

	vangogh_integration.GogIsFreeProperty:                         "Free",
	vangogh_integration.GogIsDemoProperty:                         "Demo",
	vangogh_integration.GogIsModProperty:                          "Mod",
	vangogh_integration.GogIsDiscountedProperty:                   "On Sale",
	vangogh_integration.GogPreOrderProperty:                       "Pre-order",
	vangogh_integration.GogComingSoonProperty:                     "Coming Soon",
	vangogh_integration.GogInDevelopmentProperty:                  "In Development",
	vangogh_integration.TypesProperty:                             "Data Type",
	vangogh_integration.SteamReviewScoreDescProperty:              "Steam Reviews",
	vangogh_integration.SteamDeckAppCompatibilityCategoryProperty: "Steam Deck",
	vangogh_integration.SteamOsAppCompatibilityCategoryProperty:   "SteamOS",
	vangogh_integration.ProtonDbTierProperty:                      "ProtonDB Tier",
	vangogh_integration.ProtonDbConfidenceProperty:                "ProtonDB Confidence",
	vangogh_integration.SortProperty:                              "Sort",
	vangogh_integration.DescendingProperty:                        "Desc",
	vangogh_integration.GogGlobalReleaseDateProperty:              "Global Release",
	vangogh_integration.GogReleaseDateProperty:                    "GOG.com Release",
	vangogh_integration.GogOrderDateProperty:                      "GOG.com Order",
	vangogh_integration.GogProductValidationResultProperty:        "Validation Result",
	vangogh_integration.GogProductGeneratedChecksumProperty:       "Self-Validated",
	vangogh_integration.GogRatingProperty:                         "GOG.com Rating",
	vangogh_integration.SteamReviewScoreProperty:                  "Steam Rating",
	vangogh_integration.MetacriticScoreProperty:                   "Metacritic Rating",
	vangogh_integration.GogPriceProperty:                          "Price",
	vangogh_integration.GogBasePriceProperty:                      "Base Price",
	vangogh_integration.GogDiscountPercentageProperty:             "Discount",

	vangogh_integration.HltbHoursToCompleteMainProperty: "HLTB Main Story",
	vangogh_integration.HltbHoursToCompletePlusProperty: "HLTB Story + Extras",
	vangogh_integration.HltbHoursToComplete100Property:  "HLTB Completionist",
	vangogh_integration.HltbGenresProperty:              "HLTB Genres",
	vangogh_integration.HltbPlatformsProperty:           "HLTB Platforms",
	vangogh_integration.HltbReviewScoreProperty:         "HLTB Rating",

	vangogh_integration.SummaryRatingProperty:  "Summary Rating",
	vangogh_integration.SummaryReviewsProperty: "Summary Reviews",

	vangogh_integration.OpenCriticMedianScoreProperty: "OpenCritic Rating",
	vangogh_integration.OpenCriticTierProperty:        "OpenCritic Tier",
	vangogh_integration.TopPercentProperty:            "OpenCritic Top",

	GOGLinksProperty:   "GOG.com Links",
	OtherLinksProperty: "Other Links",
	SteamLinksProperty: "Steam Links",

	vangogh_integration.GogForumUrlProperty:   "Forum",
	vangogh_integration.GogStoreUrlProperty:   "Store",
	vangogh_integration.GogSupportUrlProperty: "Support",

	SteamCommunityUrlProperty: "Community",
	SteamGuidesUrlProperty:    "Guides",

	GOGDBUrlProperty:        "GOGDB",
	IGDBUrlProperty:         "IGDB",
	HltbUrlProperty:         "HLTB",
	MobyGamesUrlProperty:    "MobyGames",
	PCGamingWikiUrlProperty: "PCGamingWiki",
	ProtonDBUrlProperty:     "ProtonDB",
	StrategyWikiUrlProperty: "StrategyWiki",
	WikipediaUrlProperty:    "Wikipedia",
	WineHQUrlProperty:       "WineHQ",
	VNDBUrlProperty:         "VNDB",
	IGNWikiUrlProperty:      "IGN Wiki",
	OpenCriticUrlProperty:   "OpenCritic",
	MetacriticUrlProperty:   "Metacritic",
	WebsiteUrlProperty:      "Website",

	vangogh_integration.CreditsProperty:     "Credits",
	vangogh_integration.CreatorsProperty:    "Creators",
	vangogh_integration.DirectorsProperty:   "Directors",
	vangogh_integration.ProducersProperty:   "Producers",
	vangogh_integration.DesignersProperty:   "Designers",
	vangogh_integration.ProgrammersProperty: "Programmers",
	vangogh_integration.ArtistsProperty:     "Artists",
	vangogh_integration.WritersProperty:     "Writers",
	vangogh_integration.ComposersProperty:   "Composers",
}
View Source
var SearchProperties = []string{

	vangogh_integration.GogTitleProperty,
	vangogh_integration.OperatingSystemsProperty,
	vangogh_integration.GogDevelopersProperty,
	vangogh_integration.GogPublishersProperty,

	vangogh_integration.GogOwnedProperty,

	vangogh_integration.GogTagIdProperty,
	vangogh_integration.LocalTagsProperty,
	vangogh_integration.GogUserWishlistProperty,

	vangogh_integration.CreditsProperty,

	vangogh_integration.GogProductTypeProperty,
	vangogh_integration.LanguageCodeProperty,

	vangogh_integration.GogIsFreeProperty,
	vangogh_integration.GogIsDemoProperty,
	vangogh_integration.GogIsModProperty,
	vangogh_integration.GogIsDiscountedProperty,
	vangogh_integration.GogPreOrderProperty,
	vangogh_integration.GogComingSoonProperty,
	vangogh_integration.GogInDevelopmentProperty,
	vangogh_integration.TypesProperty,
	vangogh_integration.SummaryReviewsProperty,
	vangogh_integration.SteamReviewScoreDescProperty,
	vangogh_integration.OpenCriticTierProperty,
	vangogh_integration.TopPercentProperty,

	vangogh_integration.HltbPlatformsProperty,
	vangogh_integration.EnginesProperty,
	vangogh_integration.EnginesBuildsProperty,
	vangogh_integration.GogSeriesProperty,
	vangogh_integration.GogGenresProperty,
	vangogh_integration.GogThemesProperty,
	vangogh_integration.HltbGenresProperty,
	vangogh_integration.GogStoreTagsProperty,
	vangogh_integration.GogFeaturesProperty,
	vangogh_integration.GogGameModesProperty,
	vangogh_integration.SteamCategoriesProperty,

	vangogh_integration.SteamDeckAppCompatibilityCategoryProperty,
	vangogh_integration.SteamOsAppCompatibilityCategoryProperty,
	vangogh_integration.ProtonDbTierProperty,
	vangogh_integration.ProtonDbConfidenceProperty,

	vangogh_integration.GogGlobalReleaseDateProperty,
	vangogh_integration.GogReleaseDateProperty,
	vangogh_integration.GogOrderDateProperty,

	vangogh_integration.GogProductValidationResultProperty,
	vangogh_integration.GogProductGeneratedChecksumProperty,

	vangogh_integration.SortProperty,
	vangogh_integration.DescendingProperty,
}
View Source
var SearchScopePermissions = map[string]author.Permission{
	SearchGog:      perm.ReadOwned,
	SearchWishlist: perm.ReadWishlist,
}
View Source
var SectionAccessKeys = map[string]string{
	InfoSection:          "i",
	OfferingsSection:     "o",
	MediaSection:         "m",
	NewsSection:          "n",
	ReceptionSection:     "r",
	CompatibilitySection: "c",
	InstallersSection:    "f",
}
View Source
var SectionStyles = map[string]string{
	InfoSection:          "info.css",
	OfferingsSection:     "offerings.css",
	MediaSection:         "media.css",
	NewsSection:          "news.css",
	ReceptionSection:     "reception.css",
	CompatibilitySection: "compatibility.css",
	InstallersSection:    "installers.css",
}
View Source
var SectionTitles = map[string]string{
	InfoSection:          "Info",
	OfferingsSection:     "Offerings",
	MediaSection:         "Media",
	NewsSection:          "News",
	ReceptionSection:     "Reception",
	CompatibilitySection: "Compatibility",
	InstallersSection:    "Files",
}
View Source
var SteamNewsTags = map[string]string{
	"halloween":  "Halloween",
	"workshop":   "Workshop",
	"patchnotes": "Patch",
}
View Source
var TypesTitles = map[string]string{
	vangogh_integration.GogLicences.String():                  "GOG Licences",
	vangogh_integration.GogUserWishlist.String():              "GOG User Wishlist",
	vangogh_integration.GogAccountPage.String():               "GOG Account Page",
	vangogh_integration.GogApiProducts.String():               "GOG API Products",
	vangogh_integration.GogCatalogPage.String():               "GOG Catalog Page",
	vangogh_integration.GogDetails.String():                   "GOG Details",
	vangogh_integration.GogOrderPage.String():                 "GOG Order Page",
	vangogh_integration.HltbData.String():                     "HowLongToBeat Data",
	vangogh_integration.HltbRootPage.String():                 "HowLongToBeat Root Page",
	vangogh_integration.PcgwSteamPageId.String():              "PCGamingWiki Steam PageId",
	vangogh_integration.PcgwGogPageId.String():                "PCGamingWiki GOG PageId",
	vangogh_integration.PcgwRaw.String():                      "PCGamingWiki Raw",
	vangogh_integration.WikipediaRaw.String():                 "Wikipedia Raw",
	vangogh_integration.SteamAppDetails.String():              "Steam App Details",
	vangogh_integration.SteamAppNews.String():                 "Steam App News",
	vangogh_integration.SteamAppReviews.String():              "Steam Reviews",
	vangogh_integration.ProtonDbSummary.String():              "ProtonDB Summary",
	vangogh_integration.GamesDbGogProducts.String():           "GamesDB GOG Products",
	vangogh_integration.SteamDeckCompatibilityReport.String(): "Steam Deck Compat Report",
	vangogh_integration.OpenCriticApiGame.String():            "OpenCritic API Game",
}

Functions

func EncodeQuery

func EncodeQuery(query map[string][]string) string

func FormatLanguage

func FormatLanguage(lc string) string

func GetKeyValuesBytes added in v1.2.7

func GetKeyValuesBytes(id, property string) ([]byte, error)

func HasKeyValuesBytes added in v1.2.7

func HasKeyValuesBytes(id, property string) (bool, error)

func LanguageCodeFlag

func LanguageCodeFlag(lc string) string

func LanguageCodeTitle

func LanguageCodeTitle(lc string) string

func PermittedProperties added in v1.2.0

func PermittedProperties(properties []string, permissions ...author.Permission) iter.Seq[string]

func SearchScopeFromQuery

func SearchScopeFromQuery(query map[string][]string) string

func SearchScopes

func SearchScopes() map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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