changeset 69:df3230f8aa46

Translate some comments to english and cosmetic fixes.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 11 Sep 2011 17:43:32 +0300
parents 3762c621d1c3
children 15fc72bc3f3e
files hae_feedit.tcl hae_ruoka.tcl hae_saatiedot.tcl
diffstat 3 files changed, 34 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/hae_feedit.tcl	Sun Sep 11 16:48:48 2011 +0300
+++ b/hae_feedit.tcl	Sun Sep 11 17:43:32 2011 +0300
@@ -2,14 +2,14 @@
 #
 # NOTICE! Change above path to correct tclsh binary path!
 #
-############################################################################
+##########################################################################
 #
 # FeedCheck fetcher v0.7 by ccr/TNSP <ccr@tnsp.org>
-# (C) Copyright 2008-2010 Tecnic Software productions (TNSP) 
+# (C) Copyright 2008-2011 Tecnic Software productions (TNSP) 
 #
 # This script is freely distributable under GNU GPL (version 2) license.
 #
-############################################################################
+##########################################################################
 
 # Datafile, MUST be set to same as in feeds.tcl
 set datafile "/home/niinuska/bot/data.feeds"
@@ -22,7 +22,7 @@
 set http_proxy_port 800
 
 
-##############################################################################
+##########################################################################
 set html_ent [split "&#160;| |&raquo;|>>|&quot;|\"|&auml;|ä|&ouml;|ö|&Auml;|Ä|&Ouml;|Ö|&amp;|&|&lt;|<|&gt;|>|ä|ä|ö|ö|Ä|Ä" "|"]
 
 package require http
@@ -82,8 +82,8 @@
 }
 
 
-##############################################################################
-### Luetaan vanhat paskat
+##########################################################################
+### Read in old data
 set oldurls 0
 set newurls 0
 if {![catch {set ufile [open $datafile r 0600]} uerrmsg]} {
@@ -102,7 +102,7 @@
 
 
 ##############################################################################
-### Haetaan ja parsitaan Halla-ahon jutut
+### Fetch and parse Halla-aho's blog page data
 set datauri "http://www.halla-aho.com/scripta/";
 set dataname "Mestari"
 if {[catch {set utoken [::http::geturl $datauri -binary true -timeout 5000]} uerrmsg]} {
@@ -159,7 +159,7 @@
 }
 
 
-### Hae RSS-feedit
+### Generic RSS-feed fetching
 add_rss_feed "http://www.kaleva.fi/rss/145.xml" "Kaleva/Tiede" ""
 
 #add_rss_feed "http://sektori.com/?tpl=rssNewsFeed" "Sektori" ""
@@ -173,7 +173,7 @@
 #add_rss_feed "http://lehti.samizdat.info/feed/" "Lehti" ""
 
 ##############################################################################
-### Avataan tulostiedosto
+### Open data file for writing
 set tmpfname "$datafile.tmp"
 if {[catch {set outfile [open $tmpfname w 0600]} uerrmsg]} {
   puts "Error opening $tmpfname for writing: $uerrmsg"
--- a/hae_ruoka.tcl	Sun Sep 11 16:48:48 2011 +0300
+++ b/hae_ruoka.tcl	Sun Sep 11 17:43:32 2011 +0300
@@ -5,24 +5,24 @@
 ##########################################################################
 #
 # RuokaLista fetcher v1.0 by ccr/TNSP <ccr@tnsp.org>
-# (C) Copyright 2010 Tecnic Software productions (TNSP)
+# (C) Copyright 2010-2011 Tecnic Software productions (TNSP)
 #
 # This script is freely distributable under GNU GPL (version 2) license.
 #
 ##########################################################################
 
-# Datatiedosto, oltava sama kuin ruoka.tcl:n vastaava asetus
+# Path and filename of the data file, MUST BE SAME as in "ruoka.tcl"
 set datafile "/home/niinuska/bot/data.ruoka"
 
-# Käytä HTTP proxya? 1 = kyllä, 0 = ei
+# Use a HTTP proxy? (1 = yes, 0 = no)
 set http_proxy 0
 
-# HTTP proxyn osoite ja portti
+# HTTP proxy host address and port (only needed if use_proxy = 1)
 set http_proxy_host "cache.inet.fi"
 set http_proxy_port 800
 
 
-##############################################################################
+##########################################################################
 set html_ent [split "\n| |\r| |<br />| |&nbsp;| |&#160;| |&raquo;|>>|&quot;|\"|&auml;|ä|&ouml;|ö|&Auml;|Ä|&Ouml;|Ö|&amp;|&|&lt;|<|&gt;|>|ä|ä|ö|ö|Ä|Ä" "|"]
 
 package require http
@@ -112,7 +112,7 @@
 }
 
 
-##############################################################################
+##########################################################################
 set kello [clock seconds]
 set viikko [expr [clock format $kello -format "%W"] + 1]
 set vuosi [clock format $kello -format "%Y"]
@@ -133,7 +133,7 @@
 add_uniresta "$str=11" "Minttu"
 
 
-##############################################################################
+##########################################################################
 ### Open result datafile and save data
 set tmpfname "$datafile.tmp"
 if {[catch {set outfile [open $tmpfname w 0600]} uerrmsg]} {
--- a/hae_saatiedot.tcl	Sun Sep 11 16:48:48 2011 +0300
+++ b/hae_saatiedot.tcl	Sun Sep 11 17:43:32 2011 +0300
@@ -1,19 +1,29 @@
 #!/usr/bin/tclsh
+#
+# NOTICE! Change above path to correct tclsh binary path!
+#
+##########################################################################
+#
+# Improved weather data fetcher for Jedah's "saa.tcl"
+# by ccr/TNSP <ccr@tnsp.org>
+# (C) Copyright 2009-2011 Tecnic Software productions (TNSP)
+#
+# This script is freely distributable under GNU GPL (version 2) license.
+#
+##########################################################################
 
-# Polku ja tiedosto mihin tiedot talletetaan
+# Path and filename of the data file, MUST BE SAME as in "saa.tcl"
 set datafile "/home/niinuska/bot/saa.data"
 
-# HTTP proxy
-# 1 = kyllä
-# 0 = ei
+# Use a HTTP proxy? (1 = yes, 0 = no)
 set use_proxy 0
 
-# HTTP proxy osoite ja portti (jos ed. optio 1)
+# HTTP proxy host address and port (only needed if use_proxy = 1)
 set http_proxy_host "cache.inet.fi"
 set http_proxy_port 800
 
 
-##############################################################################
+##########################################################################
 package require http
 ::http::config -urlencoding iso8859-1 -useragent "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 9.5"
 if {$use_proxy != 0} {
@@ -21,7 +31,7 @@
 }
 
 
-##############################################################################
+##########################################################################
 proc fetch_uri {uurl} {
   global ngot
   if {[catch {set utoken [::http::geturl $uurl -binary true -timeout 5000]} uerrmsg]} {
@@ -35,7 +45,7 @@
   }
 }
 
-##############################################################################
+##########################################################################
 set tmpfname "$datafile.tmp"
 if {[catch {set savefile [open $tmpfname w 0600]} uerrmsg]} {
   puts "Error opening $tmpfname: $uerrmsg"