Mercurial > hg > egg-tcls
changeset 557:0ce432c3f03f
feeds: Rename some message ids, cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jul 2020 12:40:23 +0300 |
parents | e310d223dd12 |
children | e0ff67318a99 |
files | config.feeds.example feeds.tcl |
diffstat | 2 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/config.feeds.example Thu Jul 09 12:24:56 2020 +0300 +++ b/config.feeds.example Thu Jul 09 12:40:23 2020 +0300 @@ -110,8 +110,8 @@ array set feeds_messages { - "usage_full" {"usage_help"} - "usage_help" "@cmd@ \[latest \[<feed>\]|list|history\]" + "help_full" {"help"} + "help" "@cmd@ \[latest \[<feed>\]|list|history\]" "chk_unsync_entries" "Epäsynkki." "chk_new_entries" "@1@ uutta."
--- a/feeds.tcl Thu Jul 09 12:24:56 2020 +0300 +++ b/feeds.tcl Thu Jul 09 12:40:23 2020 +0300 @@ -32,8 +32,8 @@ set feeds_message "$feeds_name v2.0 by ccr/TNSP" - # ------------------------------------------------------------------------ +### Utility functions proc feeds_log {umsg} { global feeds_log_enable feeds_name if {$feeds_log_enable != 0} { @@ -137,7 +137,7 @@ set rargs [lrange $rarglist 1 end] if {$rcmd == "?" || $rcmd == "help" || $rcmd == "apua"} { - foreach ukey $feeds_messages(usage_full) { + foreach ukey $feeds_messages(help_full) { feeds_msg $upublic $unick $uchan $ukey } return 0 @@ -164,7 +164,7 @@ feeds_check_do 1 $upublic $unick $uchan } elseif {[string match "list*" $rcmd]} { # TODO FIXME - - feeds_smsg $upublic $unick $uchan "usage_help" + feeds_smsg $upublic $unick $uchan "help" } elseif {[string match "hist*" $rcmd]} { # Show history of feeds @@ -182,7 +182,8 @@ feeds_msg $upublic $unick $uchan "history_list" [list [join $ulist $ulistsep]] } else { - feeds_msg $upublic $unick $uchan "usage_help" + # Help/usage + feeds_msg $upublic $unick $uchan "help" } } @@ -223,14 +224,13 @@ } -# ------------------------------------------------------------------------ -### -### Initializing .. -### +#------------------------------------------------------------------------- +# Script initialization +#------------------------------------------------------------------------- putlog "$feeds_message" if {[catch {sqlite3 feeds_dbh $feeds_dbfile} uerrmsg]} { - putlog "Could not open SQLite3 database '${feeds_dbfile}': ${uerrmsg}." + putlog "Could not open SQLite3 database '${feeds_dbfile}': ${uerrmsg}" exit 2 } @@ -248,3 +248,5 @@ putlog " - Executing feeds_init()" feeds_init putlog " - feeds_init() done." + +# end of script