Mercurial > hg > egg-tcls
view config.weather.example @ 649:92aefade4466
calc: Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 17 Feb 2021 10:29:41 +0200 |
parents | 90da5691cc81 |
children | de6cab61061f |
line wrap: on
line source
########################################################################## # # Weather script configuration # ########################################################################## ### ### Bind commands ### bind pub - !sää weather_cmd_pub bind pub - !saa weather_cmd_pub bind msg - !sää weather_cmd_msg bind msg - !saa weather_cmd_msg bind pub - !sää weather_cmd_pub bind pub - !saa weather_cmd_pub bind msg - !sää weather_cmd_msg bind msg - !saa weather_cmd_msg # Name of the command used for help texts set weather_cmd_name "!saa" # Sub-command name regexp patterns array set weather_commands { "help" {^(\?|help|apua)$} "stations" {^(stations|asemat)$} "nearest" {^(lahin|lähin|lähin|closest|nearest)$} "default" {^(vakiot?|defaults?)$} "alias" {^(alias)$} "unalias" {^(unalias)$} "list" {^(list|listaa?)$} } ### ### Settings ### # Channels where weather functionality is enabled # set weather_channels "#foobar;#baz" # You can use * to match substrings or everything set weather_channels "*" # Default location if none given and none set by user. # Multiple can be specified as "foo;bar;etc" set weather_default_locations "raahe lapaluoto;pattijoki" # Weather data file, must match the one in fetch_weather.pl's config set weather_datafile "/home/niinuska/bot/weather.data" # Alias data file set weather_aliasfile "/home/niinuska/bot/weather.alias" # How often to check the weather data file for updates (in minutes) set weather_check_period 1 # Max number of results to be listed set weather_max_results 3 # 1 = Enable logging of various script actions into bot's log # 0 = Don't. set weather_log_enable 1 # What IRC "command" should we use to send messages: # (Valid alternatives are "PRIVMSG" and "NOTICE") set weather_preferredmsg "PRIVMSG" ### ### Message texts (informal, errors, etc.) ### set weather_msg_list_station [list "\002@station@\002 ( http://www.google.fi/maps/@@c_lat@,@c_lng@,18z )"] # Array/list of wind directions (8 in total) set weather_msg_wind_directions [list] lappend weather_msg_wind_directions "pohjoinen (N)" lappend weather_msg_wind_directions "koillinen (NE)" lappend weather_msg_wind_directions "itä (E)" lappend weather_msg_wind_directions "kaakko (SE)" lappend weather_msg_wind_directions "etelä (S)" lappend weather_msg_wind_directions "lounas (SW)" lappend weather_msg_wind_directions "länsi (W)" lappend weather_msg_wind_directions "luode (NW)" # Array/list of FMI cloudiness value descriptions # (9 values ranging from "clear" to "cloudy") set weather_msg_cloudiness [list] lappend weather_msg_cloudiness "selkeää" lappend weather_msg_cloudiness "melkein selkeää" lappend weather_msg_cloudiness "verrattain selkeää" lappend weather_msg_cloudiness "verrattain selkeää" lappend weather_msg_cloudiness "puolipilvistä" lappend weather_msg_cloudiness "verrattain pilvistä" lappend weather_msg_cloudiness "verrattain pilvistä" lappend weather_msg_cloudiness "melkein pilvistä" lappend weather_msg_cloudiness "pilvistä" # 10 = fully cloudy lappend weather_msg_cloudiness "täysin pilvistä" # Array/list of Tiehallinto precipitation value descriptions set weather_msg_precipitation [list] lappend weather_msg_precipitation "poutaa" lappend weather_msg_precipitation "heikkoa sadetta" lappend weather_msg_precipitation "kohtalaista sadetta" lappend weather_msg_precipitation "voimakasta sadetta" lappend weather_msg_precipitation "heikkoa lumisadetta/räntää" lappend weather_msg_precipitation "kohtalaista lumisadetta/räntää" lappend weather_msg_precipitation "voimakasta lumisadetta/räntää" # Array/list containing optional parts of the result message for one # one measurement station. Every array element except the first one # are optional and will only be appended to result string IF the # named @token@ value is "set" e.g. not empty or in some cases invalid. set weather_msg_result [list] lappend weather_msg_result "\002@station@\002, @ctime@: " lappend weather_msg_result "\002@temp@°C\002" lappend weather_msg_result ", tie @road_surface_temp@°C" lappend weather_msg_result ", kosteus \002@humidity@\002%" lappend weather_msg_result ", tuuli \002@wind_speed@\002 m/s" #lappend weather_msg_result " (suunta @wind_direction@ - @wind_direction_deg@°)" lappend weather_msg_result " - @wind_direction@" lappend weather_msg_result ", \002@cloudiness@\002 (@cloudiness_val@)" lappend weather_msg_result ", näkyvyys @visibility@ km" #lappend weather_msg_result ", @precipitation@ (@precipitation2@ = @precipitation_val@)" lappend weather_msg_result ", @precipitation2@" lappend weather_msg_result "." array set weather_messages { "help_single" "@cmd@ \[paikka\]" "help_full" {"help_single" "help_stations" "help_def_set" "help_nearest" "help_alias" "help_unalias" "help_list" } "no_results" "\002@1@\002: Ei mittaustietoja." "no_data_for_location" "\002@1@\002: Paikkakunnan tietoja ei saatu." "temp_min" "Min: @1@" "temp_max" "Max: @1@" "temp_minmax" "Min: @1@\nMax: @2@" "list_nearest" $weather_msg_list_station "nearest_stations" "Lähimmät mittausasemat (@1@, @2@): @3@" "help_nearest" "@cmd@ lähin <lat>\[, \]<long> -- näyttää annettuja koordinaatteja lähimpänä olevat mittausasemat" "nearest_invalid" "@cmd@ lähin <lat>\[, \]<long> -- näyttää annettuja koordinaatteja lähimpänä olevat mittausasemat" "def_set_to" "Vakio-havaintoasemiksi asetettu: \002@1@\002." "def_value" "Käyttäjän \002@1@\002 vakio-havaintoasemat ovat: \002@2@\002." "def_not_set" "Vakio-havaintoasemia ei asetettu käyttäjälle \002@1@\002." "help_def_set" "@cmd@ vakio <paikka>\[;<paikka2>\] -- asettaa vakiohavaintoaseman\n@cmd@ vakio -- näyttää nykyisen vakiohavaintoaseman jos asetettu" "alias_set" "Luotiin alias \002@1@\002 = \002@2@\002." "alias_updated" "Päivitettiin alias \002@1@\002 = \002@2@ -> @3@\002." "alias_unset" "Poistettiin alias \002@1@ = @2@\002." "alias_item" "\002'@1@' = '@2@'\002" "alias_list" "Aliakset: @1@" "alias_list_sep" ", " "alias_not_exist" "Aliasta '@1@' ei ole olemassa." "help_alias" "@cmd@ alias <alias> = <nimi> -- lisää alias-nimen, esim. alias perse = turku" "help_unalias" "@cmd@ unalias <alias> -- poistaa aliaksen" "help_list" "@cmd@ list -- listaa määritellyt aliakset" "user_not_known" "Tuntematon käyttäjä." "no_access" "Ei oikeuksia muuttaa asetuksia." "stations_list" "Mittausasemat: @1@" "stations_no_matches" "Ei osumia." "help_stations" "@cmd@ asemat <patterni> -- listaa mittausasemat joiden nimi matsaa patternin kanssa" }