MCPcopy Create free account

hub / github.com/chubin/wttr.in / functions

Functions405 in github.com/chubin/wttr.in

↓ 2 callersFunctionloadAndSetFont
(dc *gg.Context, cat string)
internal/formatter/ansitopng/fonts.go:72
↓ 2 callersFunctionlocalizedRain
()
internal/renderer/v1/locale.go:10
↓ 2 callersFunctionlocalizedVis
()
internal/renderer/v1/locale.go:31
↓ 2 callersFunctionlocalizedWind
()
internal/renderer/v1/locale.go:52
↓ 2 callersFunctionmakeQuery
(url string, result interface{})
internal/location/nominatim.go:53
↓ 2 callersFunctionmustParseFloat
(s string)
internal/location/cache.go:439
↓ 2 callersFunctionparseHHMMSS
parseHHMM parses "15:04" style string into hours and minutes
internal/renderer/oneline/render_solar.go:194
↓ 2 callersFunctionparseTimeToMinutes
parseTimeToMinutes converts "0", "300", "600", ..., "2100" into minutes since midnight
internal/renderer/v1/helpers.go:34
↓ 2 callersMethodprocessValue
( lines *[]string, metricName, helpText, forDay, value string, alreadySeen map[string]bool, )
internal/renderer/renderer_p1.go:138
↓ 2 callersMethodputToLRU
(key string, val *Location)
internal/location/cache.go:416
↓ 2 callersMethodrenderCurrent
renderCurrent renders one block (current or forecast day)
internal/renderer/renderer_p1.go:94
↓ 2 callersFunctionreverse
(s string)
internal/renderer/v1/helpers.go:61
↓ 2 callersFunctionsimpleTextualFallback
simpleTextualFallback
internal/renderer/v2/block_textualinformation.go:223
↓ 2 callersFunctionslicesMin
(s []float64)
internal/renderer/v2/helpers.go:52
↓ 2 callersFunctionspeedToColor
speedToColor returns colored wind speed text based on speed value.
internal/renderer/v1/format.go:48
↓ 2 callersFunctionsunriseTime
sunriseTime returns local sunrise time in "HH:MM" format (24h) Uses github.com/nathan-osman/go-sunrise for accurate calculation
internal/renderer/oneline/render_solar.go:15
↓ 2 callersFunctionsunsetTime
(ctx *RenderContext)
internal/renderer/oneline/render_solar.go:42
↓ 2 callersFunctionunitRain
(unit bool, lang string)
internal/renderer/v1/locale.go:100
↓ 2 callersFunctionunitTemp
()
internal/renderer/v1/locale.go:3
↓ 2 callersFunctionvalidIP4
(ipAddress string)
internal/ip/ip.go:248
↓ 2 callersFunctionvalidateAndSetFlag
validateAndSetFlag validates and sets a single flag option.
internal/query/parse.go:105
↓ 2 callersFunctionwindDir
windDir returns ANSI-colored arrow for wind direction.
internal/renderer/v1/format.go:15
↓ 2 callersFunctionwindInRightUnits
windInRightUnits converts wind speed to the requested unit (km/h, mph, or m/s).
internal/renderer/v1/format.go:37
↓ 1 callersFunctionAppendToFile
AppendToFile appends a string to the specified file with a timestamp
internal/weather/locator_adapter.go:114
↓ 1 callersFunctionApplyAutoFixes
(opts *options.Options)
internal/query/fromrequest.go:120
↓ 1 callersFunctionConvertWeather
ConvertWeather converts domain.Weather to v1.resp
internal/renderer/v1/converter.go:8
↓ 1 callersFunctionDrawColoredTemperatureDiagram
DrawColoredTemperatureDiagram returns the Braille temperature plot with color gradient + high/low temperature labels.
internal/renderer/v2/block_temperature_colorized.go:59
↓ 1 callersMethodFlush
Flush forces a flush of the current buffer. Useful for graceful shutdown.
internal/logging/logging.go:128
↓ 1 callersFunctionFromDomainOptions
FromDomainOptions converts from the main wttr.in options.Options to PNGOptions
internal/formatter/ansitopng/options.go:42
↓ 1 callersFunctionFromRequest
FromRequest creates an options.Options struct based on the provided HTTP request. It processes the URL path, domain name, and headers according to the
internal/query/fromrequest.go:17
↓ 1 callersFunctionGenerateOptionsAndParser
GenerateOptionsAndParser is the main entry point
internal/generate/options.go:217
↓ 1 callersMethodGet
Get returns a valid, non-expired cache entry or nil if not found/expired.
internal/cache/lru.go:53
↓ 1 callersMethodGet
Get returns a valid (non-expired) cache entry.
internal/cache/disk.go:86
↓ 1 callersFunctionGetEmojiProfile
GetEmojiProfile returns the active emoji profile name based on options.
internal/renderer/oneline/render_emoji.go:81
↓ 1 callersMethodGetIPData
(ip string)
internal/weather/weather.go:30
↓ 1 callersMethodGetLocation
(location string)
internal/weather/weather.go:35
↓ 1 callersFunctionGetStringValue
GetStringValue — convenience wrapper for the most common case (strings & numbers)
internal/renderer/oneline/jq.go:38
↓ 1 callersFunctionGetValue
GetValue executes a jq query and returns the first result as interface{} Use this when you expect exactly one value (most common for weather fields)
internal/renderer/oneline/jq.go:13
↓ 1 callersMethodHasLegacyCert
HasLegacyCert returns true if the old single certificate fields are populated.
internal/server/config.go:72
↓ 1 callersFunctionHasPrefixInSlice
(what string, where []string, prefix string)
internal/util/strings.go:14
↓ 1 callersMethodInitDB
ConvertCache converts files-based cache into the DB-based cache. If reset is true, the DB cache is created from scratch. nolint:funlen,cyclop
internal/location/convert.go:15
↓ 1 callersMethodIsDisk
()
internal/cache/config.go:52
↓ 1 callersMethodIsInProgress
IsInProgress checks whether the key is currently being processed.
internal/cache/lru.go:118
↓ 1 callersFunctionLoadFromYAML
LoadFromYAML loads configuration from a YAML file and returns a pointer to Config
internal/config/config.go:47
↓ 1 callersFunctionMakeWeatherCacheKey
MakeWeatherCacheKey generates a normalized, stable cache key for weather requests. Lat/lon are rounded to ~100m precision to avoid cache fragmentation
internal/weather/weatherer_wwo_cached.go:16
↓ 1 callersMethodMarshalYAML
()
internal/config/config.go:66
↓ 1 callersFunctionNewCache
NewCache creates a new cache instance according to the configuration.
internal/location/cache.go:84
↓ 1 callersFunctionNewCache
NewCache returns new cache reader for the specified config.
internal/ip/ip.go:54
↓ 1 callersFunctionNewCacheLocator
NewCacheLocator creates a Locator backed by wttr.in-style location cache
internal/weather/locator_adapter.go:27
↓ 1 callersFunctionNewCachedWeatherClient
NewCachedWeatherClient creates a new caching wrapper around a WeatherClient.
internal/weather/weatherer_wwo_cached.go:38
↓ 1 callersFunctionNewDiskCacher
NewDiskCacher creates a new disk-backed cache. dir will be created if it doesn't exist.
internal/cache/disk.go:33
↓ 1 callersFunctionNewHTMLFormatter
NewHTMLFormatter loads the embedded template and CSS.
internal/formatter/html.go:21
↓ 1 callersFunctionNewIPCacheLocator
(cache *Cache)
internal/ip/iplocator_adapter.go:14
↓ 1 callersFunctionNewIPLocatorGeoIP2
NewIPLocatorGeoIP2 creates a new IPLocator using the given GeoIP2-City.mmdb (or GeoLite2-City.mmdb) file. Call Close() when you're done with it (or us
internal/ip/geoip2.go:20
↓ 1 callersFunctionNewLogSuppressor
NewLogSuppressor creates a new LogSuppressor for specified filename and lines to be suppressed. If filename is empty, log entries will be printed to
internal/logging/suppress.go:24
↓ 1 callersFunctionNewNominatim
(name, typ, url, token string)
internal/location/nominatim.go:25
↓ 1 callersFunctionNewPNGFormatter
NewPNGFormatter creates a new PNG formatter.
internal/formatter/png.go:14
↓ 1 callersFunctionNewPNGOptions
NewPNGOptions returns sensible defaults matching original wttr.in behavior
internal/formatter/ansitopng/options.go:29
↓ 1 callersFunctionNewPageRenderer
()
internal/renderer/renderer_page.go:16
↓ 1 callersFunctionNewPrometheusRenderer
NewPrometheusRenderer creates a new Prometheus renderer
internal/renderer/renderer_p1.go:56
↓ 1 callersFunctionNewRenderer
NewRenderer creates a new subprocess renderer with the given routing rules. The slice order determines matching priority (first match wins).
internal/renderer/subprocess/subprocess.go:56
↓ 1 callersFunctionNewSearcher
NewSearcher returns a new Searcher for the specified config.
internal/location/search.go:15
↓ 1 callersFunctionNewUplinkProcessor
(cfg *Config)
internal/uplink/uplink.go:27
↓ 1 callersFunctionNewWeatherClient
NewWeatherClient creates a new WeatherClient with proper connection pooling.
internal/weather/weatherer_wwo.go:33
↓ 1 callersFunctionNewWeatherService
NewWeatherService initializes a new pipeline based on the provided options.
internal/weather/weather.go:114
↓ 1 callersMethodParse
Parse implements QueryParser.Parse
internal/query/queryparser.go:29
↓ 1 callersFunctionParseOptionsInFilename
ParseOptionsInFilename converts a wttr.in-style PNG filename into *options.Options using the same parsing/validation pipeline as normal ?query=string
internal/query/fromrequest.go:220
↓ 1 callersMethodPut
Put stores the location in the configured backend (now uses batching for DB)
internal/location/cache.go:344
↓ 1 callersMethodPut
(addr string, loc *Address)
internal/ip/ip.go:114
↓ 1 callersMethodQuery
(*Nominatim, string)
internal/location/nominatim.go:22
↓ 1 callersMethodRead
Read fetches location from cache (LRU already checked in Resolve).
internal/location/cache.go:275
↓ 1 callersFunctionRemoveANSI
(text []byte)
internal/util/termutil/termutil.go:81
↓ 1 callersFunctionRemoveFileIfExists
RemoveFileIfExists removes filename if exists, or does nothing if the file is not there. Returns an error, if it occurred during deletion.
internal/util/files.go:7
↓ 1 callersMethodRender
Render implements the weather.Renderer interface.
internal/renderer/v1/renderer.go:33
↓ 1 callersFunctionRenderANSI
RenderANSI renders ANSI text to PNG using strongly-typed PNGOptions.
internal/formatter/ansitopng/ansitopng.go:31
↓ 1 callersFunctionRenderConditionFullName
────────────────────────────────────────────────────────────────────────────── All render functions — same signature ─────────────────────────────────
internal/renderer/oneline/render.go:15
↓ 1 callersFunctionRenderHumidity
(ctx *RenderContext)
internal/renderer/oneline/render.go:93
↓ 1 callersFunctionRenderMoonPhaseEmoji
RenderMoonPhaseEmoji — improved to better match visual expectation + Python spirit
internal/renderer/oneline/render_moon.go:30
↓ 1 callersFunctionRenderPressure
(ctx *RenderContext)
internal/renderer/oneline/render.go:115
↓ 1 callersFunctionRenderSolarNoon
(ctx *RenderContext)
internal/renderer/oneline/render.go:150
↓ 1 callersFunctionRenderTemperature
(ctx *RenderContext)
internal/renderer/oneline/render.go:35
↓ 1 callersFunctionRenderWind
(ctx *RenderContext)
internal/renderer/oneline/render.go:65
↓ 1 callersMethodRoute
(opts *options.Options, r *http.Request, ipData *domain.IPData, location *domain.Location)
internal/weather/weather.go:76
↓ 1 callersMethodSearch
Search makes queries through all known providers, and returns response, as soon as it is not nil. If all responses were nil, the last response is retu
internal/location/search.go:29
↓ 1 callersFunctionServe
(conf *Config, logConf *logging.Config, ws *weather.WeatherService)
internal/server/server.go:229
↓ 1 callersFunctionSplitCamelCase
SplitCamelCase splits a CamelCase string into words and joins them with spaces.
internal/weather/locator_adapter.go:138
↓ 1 callersMethodString
()
internal/logging/logging.go:30
↓ 1 callersFunctionToANSI
ToANSI converts a go-te Screen back into a colored ANSI string that can be printed directly to a terminal.
internal/renderer/teansi/teansi.go:14
↓ 1 callersFunctionTolerantUnescape
TolerantUnescape decodes a string by replacing percent-encoded sequences (%XX) with their corresponding byte values, where XX is a two-digit hexadecim
internal/renderer/oneline/oneline.go:217
↓ 1 callersFunctionTranslateWeather
TranslateWeather translates weather descriptions and adds both lang_xx and lang_{lang} keys.
internal/localization/weatherer_translate.go:10
↓ 1 callersFunctionTruecolorTo256
TruecolorTo256 converts all 24-bit truecolor ANSI sequences (;G;Bm and ;G;Bm) into the closest 256-color equivalents (NNm and
internal/util/termutil/termutil.go:15
↓ 1 callersFunctionValidate
(opts *options.Options)
internal/query/fromrequest.go:325
↓ 1 callersMethodWeatherHandler
WeatherHandler handles weather requests with proper cache coalescing.
internal/weather/weather.go:168
↓ 1 callersMethodWroteHeader
()
internal/server/server.go:122
↓ 1 callersFunctionaddFrame
=================================================================== Remaining drawing functions (not in helpers.go) ==================================
internal/renderer/v2/renderer.go:111
↓ 1 callersFunctionansi256ToColor
ansi256ToColor maps common 256-color values used by wttr.in
internal/formatter/ansitopng/colors.go:47
↓ 1 callersFunctionapplyValidationRule
applyValidationRule applies a single validation rule (e.g., "length 6", "regexp [0-9a-fA-F]{6}").
internal/query/parse.go:198
↓ 1 callersMethodbatchWriter
── Batch Writer ─────────────────────────────────────────────────────────────
internal/location/cache.go:143
↓ 1 callersFunctionbox
box — exact port of Python _box
internal/renderer/v2/block_rain.go:75
↓ 1 callersFunctionbuildCacheKey
buildCacheKey generates a cache signature very similar to original wttr.in logic
internal/weather/cache.go:56
← previousnext →101–200 of 405, ranked by callers