# HG changeset patch # User Matti Hamalainen # Date 1422001551 -7200 # Node ID 96310b1c88fa6c55c7616e084eb816f169ce7112 # Parent da239a953e242c9019bf7a9f277fbc8ffdc25d56 feeds: Improve config resiliency. diff -r da239a953e24 -r 96310b1c88fa fetch_feeds.tcl --- a/fetch_feeds.tcl Fri Jan 23 10:25:30 2015 +0200 +++ b/fetch_feeds.tcl Fri Jan 23 10:25:51 2015 +0200 @@ -2,14 +2,14 @@ # # NOTICE! Change above path to correct tclsh binary path! # -########################################################################## +############################################################################## # # FeedCheck fetcher v0.9 by Matti 'ccr' Hamalainen # (C) Copyright 2008-2015 Tecnic Software productions (TNSP) # # This script is freely distributable under GNU GPL (version 2) license. # -########################################################################## +############################################################################## package require sqlite3 source [file dirname [info script]]/utillib.tcl @@ -19,7 +19,7 @@ source [file dirname [info script]]/config.feeds -########################################################################## +############################################################################## set feeds_ent_str "-|-|'|'|—|-|‏||—|-|–|--|‪||‬|" append feeds_ent_str "|‎||å|å|Å|Å|é|é|:|:| | " @@ -36,16 +36,18 @@ } else { ::http::config -urlencoding iso8859-1 -useragent "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 9.5" } -if {$http_use_proxy != 0} { +if {[info exists http_use_proxy] && $http_use_proxy != 0} { ::http::config -proxyhost $http_proxy_host -proxyport $http_proxy_port } -if {$http_tls_support != 0} { +if {[info exists http_tls_support] && $http_tls_support != 0} { package require tls ::http::register https 443 [list ::tls::socket -request 1 -require 1 -tls1 1 -cadir $http_tls_cadir] } +############################################################################## + proc convert_ent {udata} { global html_ent return [string map -nocase $html_ent [string map $html_ent $udata]]