This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Incith-horoscope.tcl (French version)

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
A
Azerty
Voice
Posts: 6
Joined: Fri May 25, 2007 7:44 am

Incith-horoscope.tcl (French version)

Post by Azerty »

Is what there exists in French version?

It is difficult to modify this tcl?

I speak badly English, sorry...

.....................

Edited by Alchera
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Re: Incith-horoscope.tcl (French version)

Post by Alchera »

Azerty wrote:Is what there exists in French version?

It is difficult to modify this tcl?

I speak badly English, sorry...
This Tcl is in English only as there is no function on the website it uses for any other language. Translating the contents of the script will do nothing as the output to the user will always be English.

Français :
Ce TCL est seulement en anglais car il n'y a aucune fonction sur le site Web qu'elle emploie pour n'importe quelles autres languages. La traduction du contenu du manuscrit ne servira a rien car le rendement de l'utilisateur sera toujours en anglais.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Find a french horoscope site and gimme the url, and I'll make a french horoscope script for you. Preferably a website that is fairly plain/vanilla so the regexp's won't be too complicated. You'll have to translate the script from english to french, since I don't know french, but the output will be in french if the website is.
A
Azerty
Voice
Posts: 6
Joined: Fri May 25, 2007 7:44 am

Post by Azerty »

Hello,

Thank you for you beings stopped on my problem.

Here two sites which correspond so that you ask I believe:

This site gives information interressante:

http://femmeweb.branchez-vous.com/horoscope/

And this site were used as support for another tcl which does not function any more: can (chineze horoscope include)

http://www.abidjan.net/horoscope/

I make you the copy of this tcl if you want???

Thank you with you!!! :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Yes, please give me the tcl script for abidjan.net, probably easier to fix that script than to make a whole new one.
A
Azerty
Voice
Posts: 6
Joined: Fri May 25, 2007 7:44 am

Post by Azerty »

here,
# --------------------------------------------------------------------
# /////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#||||||||||||||||||||| IRC Horoscope Viewer ||||||||||||||||||||||||
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////
# --------------------------------------------------------------------
# By Ycarus (version 0.2B)
#
# Un très simple script permettant de voir son horoscope
# L'horoscope est récupéré à partir du site : http://www.abidjan.net
#
# Projet :
# - Téléchargement des horoscopes une fois par jour, sauf pour les 'biscuits de fortune' (ou alors les rajouter dans une base).
# - Ajout des horoscopes chinois ??
# - Ajout de quelques couleurs, gras, souligné,...

set chanactivelog "#divx"

# la commande est du style :!horoscope taureau
bind pub - !horoscope viewhoroscope
proc viewhoroscope { nick uhost handle chan arg } {
#date sous la forme 2002-02-19
#if {![string match $chan $chanactivelog]} { return 0 }
set arg [string tolower $arg]
if {[string length $arg] == 0} {
set tempfileprog "/home/yannick/temphoroscope.txt"
set urlduprog "http://www.abidjan.net/horoscope/cookie.asp"
set trucdebut [http::geturl $urlduprog -timeout 20000]
if {[::http::status $trucdebut] == "timeout"} {
putserv "PRIVMSG $chan : L'horoscope est indisponible... (TimeOut)"
}
set datadehtml [::http::data $trucdebut]
set finishhttp [http::Finish $trucdebut]
set fs [open $tempfileprog w]
puts $fs $datadehtml
close $fs
set horoscopefile [open $tempfileprog r]
set horoscope ""
set debhoros "0"
set count 0
while {![eof $horoscopefile]} {
gets $horoscopefile templine
incr count
if {$templine == " <font face=\"arial\" color=\"#FF0000\" size=\"2\">"} {
set debhoros [expr $count + 1]
}
if {$debhoros == $count} {
set horoscope [string range [string trim $templine] [expr [string first "<div align=\"center\">" $templine] + 6] [string length $templine] ]
}
}
close $horoscopefile
putserv "PRIVMSG $chan : Biscuit de fortune : $horoscope"
close $horoscopefile
} {
if {$arg == "bélier"} { set arg "belier" }
if {$arg == "gémeaux"} {set arg "gemeaux" }
if {$arg == "gémeau"} {set arg "gemeaux" }
if {$arg == "poisson"} {set arg "poissons" }
set tempfileprog "/home/yannick/temphoroscope.txt"
set urlduprog "http://www.abidjan.net/horoscope/traditionel/$arg.asp"
set trucdebut [http::geturl $urlduprog -timeout 20000]
if {[::http::status $trucdebut] == "timeout"} {
putserv "PRIVMSG $chan : L'horoscope est indisponible... (TimeOut)"
}
set datadehtml [::http::data $trucdebut]
set finishhttp [http::Finish $trucdebut]
set fs [open $tempfileprog w]
puts $fs $datadehtml
close $fs
set horoscopefile [open $tempfileprog r]
set horoscope ""
set debhoros "0"
set count 0
while {![eof $horoscopefile]} {
gets $horoscopefile templine
incr count
if {$templine == " <font size=\"2\" face=\"Arial\">"} {
set debhoros [expr $count + 1]
}
if {$debhoros == $count} {
set horoscope $templine
}
}
close $horoscopefile
set horoscope "$arg : $horoscope"
putlog "horoscope : $horoscope"
set horoscope2 ""
if {[string length $horoscope] > 455} {
set horoscopetempo [string range [string trim $horoscope] 390 455]
set lefirstpoint [expr [string first ". " $horoscopetempo] + 390]
set horoscope2 [string range [string trim $horoscope] [expr $lefirstpoint + 2] [string length $horoscope] ]
set horoscope [string range [string trim $horoscope] 0 $lefirstpoint]
}
putserv "PRIVMSG $nick : $horoscope"
if {$horoscope2 != ""} {
putserv "PRIVMSG $nick : $horoscope2"
}
}
}

putlog "********* Horoscope by Ycarus *******"

It has the air simpler than the other indeed, orders !sign do not exist..


Thank you still !!!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

It was easier to write a new script after all :)

http://members.dandy.net/~fbn/french.horo.tcl.txt

I'll upload it to the archive as well, and please post any bug reports here:

http://forum.egghelp.org/viewtopic.php?p=73067
A
Azerty
Voice
Posts: 6
Joined: Fri May 25, 2007 7:44 am

Post by Azerty »

thank you infinitely Rosc2112, super work!!!
Post Reply