Mercurial > hg > egg-tcls
changeset 268:96310b1c88fa
feeds: Improve config resiliency.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 23 Jan 2015 10:25:51 +0200 |
parents | da239a953e24 |
children | d62280f2a9c7 |
files | fetch_feeds.tcl |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ccr@tnsp.org> # (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]]