Mercurial > hg > egg-tcls
diff config.urllog.example @ 590:2294b73df2cf
urllog: Massive refactoring to use similar message system as other scripts,
and general cleanups to the code. This breaks configuration backwards
compatibility completely.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 27 Jan 2021 12:01:20 +0200 |
parents | 148c7553c50f |
children | 3bd5a5e072ad |
line wrap: on
line diff
--- a/config.urllog.example Wed Jan 27 10:57:13 2021 +0200 +++ b/config.urllog.example Wed Jan 27 12:01:20 2021 +0200 @@ -5,6 +5,19 @@ ########################################################################## ### +### Bind commands +### +bind pub - !urlfind urllog_cmd_pub_find +bind msg - !urlfind urllog_cmd_msg_find +bind pubm - *.* urllog_check_line +bind topc - *.* urllog_check_line + + +# Name of the command used for help texts +set urllog_cmd_name "!urlfind" + + +### ### General options ### @@ -15,7 +28,11 @@ # Channels where URLLog announces URL titles and so on # By default we set this to same as urllog_log_channels -set urllog_msg_channels $urllog_log_channels +set urllog_pub_channels $urllog_log_channels + +# Channels where !urlfind and other commands can be used. +# By default this is set to be the same as urllog_log_channels +set urllog_search_channels $urllog_log_channels # Filename of the SQLite URL database file @@ -36,6 +53,7 @@ ### This is REQUIRED for document title fetching/storage set urllog_extra_checks 1 + ### Set to 1 if you want "strict" extra checking. This will cause ### ftp URLs not being added, and if TLS support is disabled, https URLs ### will not be added either. You probably don't want this set. @@ -51,10 +69,6 @@ ### Search related settings ### -# Channels where !urlfind and other commands can be used. -# By default this is set to be the same as urllog_log_channels -set urllog_search_channels $urllog_log_channels - # Limit how many URLs should the "!urlfind" command show at most. set urllog_showmax_pub 3 @@ -80,9 +94,6 @@ # 0 = ShortURLs not shown in any bot actions set urllog_shorturl 1 -# Max length of original URL to be shown, rest is chopped -# off if the URL is longer than the specified amount. -set urllog_shorturl_orig 30 # Web server URL that handles redirects of ShortURLs set urllog_shorturl_prefix "https://tnsp.org/u/" @@ -111,24 +122,47 @@ ### ### Message texts (informal, errors, etc.) ### - -# No such host was found -set urlmsg_nosuchhost "ei tommosta oo!" - -# Could not connect host (I/O errors etc) -set urlmsg_ioerror "kraak, virhe yhdynnässä." - -# HTTP timeout occured -set urlmsg_timeout "ei jaksa ootella" +# Max length of original URL to be shown, rest is chopped +# off if the URL is longer than the specified amount. +set urllog_shorturl_max_orig 35 -# No such document was found or other error -set urlmsg_errorgettingdoc "siitosvirhe" - -# URL was already known (was in database) -set urlmsg_alreadyknown "wanha!" -#set urlmsg_alreadyknown "Empiiristen havaintojen perusteella ja tällä sovellutusalueella esiintyneisiin aikaisempiin kontekstuaalisiin ilmaisuihin viitaten uskallan todeta, että sovellukseen ilmoittamasi tietoverkko-osoite oli kronologisti ajatellen varsin postpresentuaalisesti sopimaton ja ennestään hyvin tunnettu." - -# No match was found when searched with !urlfind or other command -set urlmsg_nomatch "Ei osumia." +# Max length of title to be shown on search results +set urllog_title_max 35 +array set urllog_messages { + "err_http_fail" "nyt meni vituix: @3@" + + "err_http_get" "kraak, virhe yhdynnässä: @2@" + + "err_http_status" "voi perse: @2@, @3@" + + "err_url_local_net" "en tykkää #1." + "err_url_invalid_net" "en tykkää #2." + "err_url_proto_class" "en tykkää #3." + "err_url_proto_no_class" "en tykkää #4." + "err_url_invalid_port" "en tykkää #5." + + "err_redirect_invalid" "paska redirecti @5@" + "err_redirect_fail" "redirekti @5@ feilasi: @1@ / @3@" + + "err_charset" "yhyy, merkistö paske! @3@" + + "url_added_short_has_title" "'@1@' (@4@) @5@" + "url_added_short_no_title" "@4@ @5@" + + "url_added_long_has_title" "'@1@' (@4@)" + "url_added_long_no_title" "@3@" + + "url_known_short" "wanha!" + "url_known_long" "wanha!" + + + "search_result_title" "'@2@' " + "search_result_no_title" "" + + "search_result_short" "#@1@: @4@@5@ @6@ (@2@ @ @3@)" + "search_result_long" "#@1@: @4@@5@ (@2@ @ @3@)" + + "search_no_match" "ei osumia." +}