17/04/2016, 13:53
Voici la partie que j'ai modifié :
namespace eval oqpme {
variable url "http://oqp.me/?q="
}
proc short { args } {
set long "$oqpme::url[oqpme::urlencode [lindex [split $args] 0]]"
set ckey [::http::geturl $long]
return [::http::data $ckey]
}
proc urlencode {string} {
set umap {"?" "%3f" "&" "%26" "/" "%2f" "=" "%3d"}
regsub -all -- {\&} $string {\$} string
set string [string map -nocase $umap $string]
return $string
}
namespace eval ::rss-synd {
variable rss
variable default
set rss(recette du jour) {
"url" "http://www.unjourunerecette.fr/rss.xml"
"channels" "#cuisine"
"database" "./databases/jourrecette.db"
"output" "\\\[\002recette du jour\002\\\] @@item!title@@ : [:qpme::short @@item!link@@]"
"trigger" "!@@feedid@@"
"update-interval" 5
}
set rss(politique) {
"url" "http://www.saveurs-et-papilles.com/rss/flux-dossiers.xml"
"channels" "#cuisine"
"database" "./databases/saveurspapille.db"
"output" "\\\[\002saveurs et papilles\002\\\] @@item!title@@ : [:qpme::short @@item!link@@]"
"trigger" "!@@feedid@@"
}
namespace eval oqpme {
variable url "http://oqp.me/?q="
}
proc short { args } {
set long "$oqpme::url[oqpme::urlencode [lindex [split $args] 0]]"
set ckey [::http::geturl $long]
return [::http::data $ckey]
}
proc urlencode {string} {
set umap {"?" "%3f" "&" "%26" "/" "%2f" "=" "%3d"}
regsub -all -- {\&} $string {\$} string
set string [string map -nocase $umap $string]
return $string
}
namespace eval ::rss-synd {
variable rss
variable default
set rss(recette du jour) {
"url" "http://www.unjourunerecette.fr/rss.xml"
"channels" "#cuisine"
"database" "./databases/jourrecette.db"
"output" "\\\[\002recette du jour\002\\\] @@item!title@@ : [:qpme::short @@item!link@@]"
"trigger" "!@@feedid@@"
"update-interval" 5
}
set rss(politique) {
"url" "http://www.saveurs-et-papilles.com/rss/flux-dossiers.xml"
"channels" "#cuisine"
"database" "./databases/saveurspapille.db"
"output" "\\\[\002saveurs et papilles\002\\\] @@item!title@@ : [:qpme::short @@item!link@@]"
"trigger" "!@@feedid@@"
}