egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tvcountdown.tcl - Upcoming episodes information.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Sun May 11, 2014 9:36 am    Post subject: tvcountdown.tcl - Upcoming episodes information. Reply with quote

Hello. This script works with tvcountdown.com:

Quote:
# Few results found.
<tvrsh> !tvcd big
<@bionic> По вашему запросу 'big' найдено 8 сериалов.
<@bionic> "Big Bad World (2013)", "Big Brother (US)", "Big School", "Big Time Rush", "John Bishop's Big Year", ...
<@bionic> Уточните параметры поиска.

# Only one result found.
<tvrsh> !tvcd big bang
<@bionic> The Big Bang Theory
<@bionic> Airtime: 20:00:00(US/Eastern) on CBS. Status: Returning Series. Country: US. Runtime: 30 min.
<@bionic> S07E23 "The Gorilla Dissolution" airs 2d 21h 16m 3s ago (08 May 2014 20:00:00)
<@bionic> S07E22 "The Proton Transmogrification" airs 9d 21h 16m 3s ago (01 May 2014 20:00:00)
<@bionic> S07E24 "The Status Quo Combustion" airs in 4d 2h 43m 57s (15 May 2014 20:00:00)


Its in russian, but you can translate it to any lang you like. Only few phrases inside.

Download: tvcountdown.tcl
_________________
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Thu May 15, 2014 7:09 am    Post subject: Reply with quote

awesome script man, I'm already using it Smile

there seems to be an issue with some chars though in the results...
see the bold ones...

Quote:
<@spithash> !tv anna and katy
<@nagger> Anna &amp; Katy


also...

Quote:
<@spithash> !tv beauty and the beast
<@nagger> Beauty and the Beast (2012)
<@nagger> Airtime: 21:00:00(GMT-5 +DST) on CW. Status: Returning Series. Country: US. Runtime: 60 min.
<@nagger> S02E16 "About Last Night" airs 65d 16h 4m 42s ago (10 March 2014 21:00:00)
<@nagger> S02E15 "Catch Me If You Can" airs 72d 16h 4m 42s ago (03 March 2014 21:00:00)
<@nagger> S02E17 "Beast Is The New Black" airs in 18d 6h 55m 18s (02 June 2014 21:00:00)
<@nagger> S02E18 "&nbsp;" airs in 25d 6h 55m 18s (09 June 2014 21:00:00)

_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Thu May 15, 2014 2:31 pm    Post subject: Reply with quote

Add
Code:
        set data [string map {"&amp;" "&" "&nbsp;" " "} $data]

before
Code:
        set stitle ""


And change
Code:
            foreach futureepisode $futureepisodes {
                if {$currf < $tvcountdown(searchfutlines)} {
                    putserv "PRIVMSG $chan :[lindex $futureepisodes $currf] $tvcountdown(color1)airs in [::tvcountdown::tvcountdown_duration [expr [clock scan "[lindex $ftimestamps $currf]" -base [clock seconds]] - [clock seconds]]] $tvcountdown(color1)($tvcountdown(color2)[lindex $ftimestamps $currf]$tvcountdown(color1))\003"
                    incr currf
                }
            }

to
Code:
        if {[info exists futureepisodes] && $futureepisodes != ""} {
            foreach futureepisode $futureepisodes {
                if {$currf < $tvcountdown(searchfutlines)} {
                    putserv "PRIVMSG $chan :[lindex $futureepisodes $currf] $tvcountdown(color1)airs in [::tvcountdown::tvcountdown_duration [expr [clock scan "[lindex $ftimestamps $currf]" -base [clock seconds]] - [clock seconds]]] $tvcountdown(color1)($tvcountdown(color2)[lindex $ftimestamps $currf]$tvcountdown(color1))\003"
                    incr currf
                }
            }
        }

_________________
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Thu May 15, 2014 4:02 pm    Post subject: Reply with quote

you are awesome! thanks! Wink
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Fri May 16, 2014 5:10 pm    Post subject: Reply with quote

what if I want to "hide" the future episode titles to avoid spoilers?
could this be made with a switch for example?
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Sun May 18, 2014 3:39 am    Post subject: Reply with quote

Updated. Look at
Code:
        hidefuturetitles 0
        hidefuturetitlestext "\00304\002no spoilers!\00304\002"

_________________
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Sun May 18, 2014 4:08 am    Post subject: Reply with quote

Thank you very much man Cool
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
ViciousPiranha
Voice


Joined: 17 Dec 2012
Posts: 36

PostPosted: Sun May 25, 2014 11:47 am    Post subject: Reply with quote

Thank you, can there be an english version of the output? I got an error earlier and couldn't tell what it means
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Mon Jun 23, 2014 2:14 pm    Post subject: Reply with quote

I think that the script stopped working Confused
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
username
Op


Joined: 06 Oct 2005
Posts: 196
Location: Russian Federation, Podolsk

PostPosted: Thu Jul 10, 2014 1:46 pm    Post subject: Reply with quote

Updated.
_________________
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bunnybump
Voice


Joined: 17 Aug 2012
Posts: 9

PostPosted: Sat Sep 13, 2014 12:30 am    Post subject: Reply with quote

i upgraded my tcl into Tcl8.6 and guess what? suddenly the script stopped working. so now the script doesn't works well. the script cannot find any tv series Sad
_________________
In the Beginning... Was the Command Line
Back to top
View user's profile Send private message Visit poster's website
spithash
Master


Joined: 12 Jul 2007
Posts: 245
Location: DALnet, EFnet & Freenode

PostPosted: Fri Oct 03, 2014 1:37 pm    Post subject: Reply with quote

Yeah same for me.

Also, it would be really nice if username could translate it to english. I had my version translated to english but after having to update the script with username's changes a couple of times, I got really lazy translating it all the time Very Happy

It's a really nice and useful script Smile
_________________
DALnet #CodeMasters - EFnet #eggtcl Nick: spithash
Click here for troll.tcl
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber