compton_data

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: AGPL-3.0 Imports: 9 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"
	SearchOwned                  = "Own"
	SearchWishlist               = "Wish"
	SearchSale                   = "Sale"
	SearchGogPreservationProgram = "GPP"
	SearchMods                   = "Mods"
)
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.TitleProperty:               "Title",
	vangogh_integration.DescriptionOverviewProperty: "Description",
	vangogh_integration.TagIdProperty:               "Account Tags",
	vangogh_integration.LocalTagsProperty:           "Local Tags",
	vangogh_integration.OperatingSystemsProperty:    "OS",
	vangogh_integration.DevelopersProperty:          "Developers",
	vangogh_integration.PublishersProperty:          "Publishers",
	vangogh_integration.EnginesProperty:             "Engine",
	vangogh_integration.EnginesBuildsProperty:       "Engine Build",
	vangogh_integration.SeriesProperty:              "Series",
	vangogh_integration.GenresProperty:              "Genres",
	vangogh_integration.ThemesProperty:              "Themes",
	vangogh_integration.StoreTagsProperty:           "Store Tags",
	vangogh_integration.SteamCategoriesProperty:     "Steam Categories",
	vangogh_integration.FeaturesProperty:            "Features",
	vangogh_integration.GameModesProperty:           "Game Modes",
	vangogh_integration.LanguageCodeProperty:        "Language",

	vangogh_integration.IsIncludedByGamesProperty: "Editions",
	vangogh_integration.IsRequiredByGamesProperty: "DLCs",
	vangogh_integration.IsModifiedByGamesProperty: "Mods",
	vangogh_integration.IncludesGamesProperty:     "Includes",
	vangogh_integration.RequiresGamesProperty:     "Requires",
	vangogh_integration.ModifiesGamesProperty:     "Modifies",

	vangogh_integration.ProductTypeProperty: "Product Type",

	vangogh_integration.UserWishlistProperty: "Wishlisted",
	vangogh_integration.OwnedProperty:        "Owned",

	vangogh_integration.IsFreeProperty:                            "Free",
	vangogh_integration.IsDemoProperty:                            "Demo",
	vangogh_integration.IsModProperty:                             "Mod",
	vangogh_integration.IsDiscountedProperty:                      "On Sale",
	vangogh_integration.PreOrderProperty:                          "Pre-order",
	vangogh_integration.ComingSoonProperty:                        "Coming Soon",
	vangogh_integration.InDevelopmentProperty:                     "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.GlobalReleaseDateProperty:                 "Global Release",
	vangogh_integration.GOGReleaseDateProperty:                    "GOG.com Release",
	vangogh_integration.GOGOrderDateProperty:                      "GOG.com Order",
	vangogh_integration.ProductValidationResultProperty:           "Validation Result",
	vangogh_integration.RatingProperty:                            "GOG.com Rating",
	vangogh_integration.SteamReviewScoreProperty:                  "Steam Rating",
	vangogh_integration.MetacriticScoreProperty:                   "Metacritic Rating",
	vangogh_integration.PriceProperty:                             "Price",
	vangogh_integration.BasePriceProperty:                         "Base Price",
	vangogh_integration.DiscountPercentageProperty:                "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.ForumUrlProperty:   "Forum",
	vangogh_integration.StoreUrlProperty:   "Store",
	vangogh_integration.SupportUrlProperty: "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.TitleProperty,
	vangogh_integration.DescriptionOverviewProperty,
	vangogh_integration.OperatingSystemsProperty,
	vangogh_integration.DevelopersProperty,
	vangogh_integration.PublishersProperty,

	vangogh_integration.OwnedProperty,

	vangogh_integration.TagIdProperty,
	vangogh_integration.LocalTagsProperty,
	vangogh_integration.UserWishlistProperty,

	vangogh_integration.CreditsProperty,

	vangogh_integration.ProductTypeProperty,
	vangogh_integration.LanguageCodeProperty,

	vangogh_integration.IsFreeProperty,
	vangogh_integration.IsDemoProperty,
	vangogh_integration.IsModProperty,
	vangogh_integration.IsDiscountedProperty,
	vangogh_integration.PreOrderProperty,
	vangogh_integration.ComingSoonProperty,
	vangogh_integration.InDevelopmentProperty,
	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.SeriesProperty,
	vangogh_integration.GenresProperty,
	vangogh_integration.ThemesProperty,
	vangogh_integration.HltbGenresProperty,
	vangogh_integration.StoreTagsProperty,
	vangogh_integration.FeaturesProperty,
	vangogh_integration.GameModesProperty,
	vangogh_integration.SteamCategoriesProperty,

	vangogh_integration.SteamDeckAppCompatibilityCategoryProperty,
	vangogh_integration.SteamOsAppCompatibilityCategoryProperty,
	vangogh_integration.ProtonDBTierProperty,
	vangogh_integration.ProtonDBConfidenceProperty,

	vangogh_integration.GlobalReleaseDateProperty,
	vangogh_integration.GOGReleaseDateProperty,
	vangogh_integration.GOGOrderDateProperty,

	vangogh_integration.ProductValidationResultProperty,

	vangogh_integration.SortProperty,
	vangogh_integration.DescendingProperty,
}
View Source
var SearchScopePermissions = map[string]author.Permission{
	SearchOwned:    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.Licences.String():                     "Licences",
	vangogh_integration.UserWishlist.String():                 "User Wishlist",
	vangogh_integration.AccountPage.String():                  "Account Page",
	vangogh_integration.ApiProducts.String():                  "API Products",
	vangogh_integration.CatalogPage.String():                  "Catalog Page",
	vangogh_integration.Details.String():                      "Details",
	vangogh_integration.HltbData.String():                     "HowLongToBeat Data",
	vangogh_integration.HltbRootPage.String():                 "HowLongToBeat Root Page",
	vangogh_integration.OrderPage.String():                    "Order 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 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