Yeah, was going to be two variables there. But afterwards, it was like why? They would both be the same thing. That is the display option for redirecting loop errors where the query redirects back to itself.holycrap wrote:I only see one variable "%%site%%".# DISPLAY OPTION 8
# you get two variable to use here:
Code: Select all
# DEBUG DEBUG
set junk [open "ig-debug.txt" w]
puts $junk $html
close $junk
Where noun above can also be verb, adj, adv, or all (as well as any combination you place within the types config variable). The above also assumes the switchorder is set to 0 (type/range), and switcher is set to "--". The purpose of the typeline variable is to match the webpage as it calls them. This order must be used when configuring your types variable. You can use any number of abbreviations within types.!dict egg - default amount of results for each type
!dict --noun egg - default amount of noun results for egg
!dict --noun3 egg - the 3rd noun result for egg
!dict --noun1-3 egg - the 1st thru 3rd noun result for egg
!dict --all egg - every result for egg that appears for any type
!dict --all5-all egg - the 5th to last results for egg that appears for any type
!dict --nounall-3 egg - the start thru 3rd noun result for egg
!dict --noun3-all egg - the 3rd thru last noun result for egg
If you have problems with editing the types and having the script recognize them correctly enabling debug will show output similar to above. The important parts are input, start, end and typeline as these parts the script is manipulating. The first two, types and range are generated by the user...<speechles> !dict --a2-all egg
<sp33chy> <( #test )> "--a2-all egg" :: types = a; range = 2-all; input = egg; start = 2; end = 7; typeline = all
<speechles> !dict egg
<sp33chy> <( #test )> "egg" :: types = ; range = ; input = egg; start = 1; end = 1; typeline = all
<speechles> !dict --adj19-all hot tub
<sp33chy> <( #test )> "--adj19-all hot tub" :: types = adj; range = 19-all; input = hot tub; start = 19; end = 24; typeline = adjective
<speechles> !dict hot tub
<sp33chy> <( #test )> "--hot tub" :: types = ; range = hot; input = hot tub; start = 1; end = 1; typeline = all
This is also fully configureable, you decide what is in your debug line yourself. At your whim are literally a ton of (well, 10.. heh) variables to use to build it. Have a fun..... in channel #testing ...
<speechles>!dict --nall blue
... in partyline/log debug ...
<(speechles@#testing)> "!dict --nall egg" --> egg (noun 1-5)
... in private message to bot ...
<speechles> !dict --v1-3 egg
... in partyline/log debug ...
<(speechles@speechles)> "!dict --v1-3 egg" --> egg (verb 1-3)