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 

incith:acronym (r128) (Sep. 13th, 2009)
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Thu Nov 16, 2006 7:24 pm    Post subject: incith:acronym (r128) (Sep. 13th, 2009) Reply with quote

Newest versions of my scripts are always available @ incith.com if they are not yet available on the Tcl archive.

Acronym searches from http://acronyms.silmaril.ie/cgi-bin/uncgi/acronyms. !a <acronym>. Suggestions welcome. Smile

-r128: script is working again at new url.
_________________
; Answer a few unanswered posts!


Last edited by incith on Sun Sep 13, 2009 10:08 pm; edited 12 times in total
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Nov 17, 2006 5:04 am    Post subject: first bug report woo me :) Reply with quote

First, THANK YOU INCITH!! Don't worry about the competiting script in the tcl archive, it doesn't even work Razz Not to mention lacks the features yours has Wink

Next, a bug: When I searched for "lmao" the script only showed 2 of 3 responses, although I do have the limit set to 5. Curiously, it was the middle def that was not shown.

Then, some suggestions (I've only been testing for like 4 minutes so I'll prolly have more to pester you with later Wink

Put in a usage msg if you type just ".acronym" - I put in a little line that just says "Usage: .acro <acronym to lookup>"

Perhaps add some indication of how many matches were found, and we're only showing [5/10000] or something so the user knows there were more entries not shown.

Another idea, since acronymfinder.com splits defs into categories, perhaps you could work in an option to let the user see the categories that the match was found in, and then they could pick the category, like:
.acro categoryname: acronym
(take a look at the dictionary.com script I did, for example, I put in a dbmatch option to show which db a word is in, and an option to pick which db to get the word from) Or even possibly let the user pick the definition number to show (similar to Perplexa's urban dictionary script).

Just some ideas to kick around Smile

And yeah, I agree with hating the chanset stuff, but I'll hack my own "set acrochans" thingy into my copy Wink

Thanks again for another well-done script to add to the bots Smile
InfoBot eat your heart out! Razz
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri Nov 17, 2006 5:29 pm    Post subject: Reply with quote

Hah, seems I'm not parsing the results with the blue table background color. Thanks for that catch.. I was wondering why TIAS did not return Try It And See!

Anyway, I'll get to work on it, 1.1 is the initial version + &amp quick-fix, but glad to see someone is interested, I'll get 1.2 up sometime.

Edit: 1.2 has been submitted and is linked to in the first post, just a quick fix release to make sure all the results are getting parsed. As for categories that's something I'll have to think about, as I'm not sure they'd be entirely useful on a site such as this.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Tue Nov 28, 2006 6:14 pm    Post subject: Reply with quote

v1.3 released, can be downloaded from the first post.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Nov 28, 2006 8:29 pm    Post subject: diff to add total matches found Reply with quote

Hi Incith,

I thought I'd offer the following small hack I added to show the total results found (cos I'm one of *those* people who like to know these things Wink

This is a unified 'diff' with no extra parameters:
Code:

@@ -269,6 +248,10 @@
       if {[regexp {no acronym matches for <strong>} $html]} {
         set output(error) "The requested acronym was not found."
       }
+       # my hack for showing total matches found -rosc
+       set totalmatches ""
+       regexp {>Your acronym search<br>returned (.*?) meanings} $html match totalmatches
+
       # acronyms
       while {$results < $incith::acronym::max_results} {
         # the regexp grabs the data and stores them into their variables, while
@@ -285,7 +268,17 @@
       }
 
       if {[info exists final_output] == 1} {
-        set output(acronym) $final_output
+       # my hack to show total matches found -rosc
+       if {$totalmatches != ""} {
+               if {$results <  $incith::acronym::max_results} {
+                       set maxresults $results
+               } else {
+                       set maxresults $incith::acronym::max_results
+               }
+               set output(acronym) "(Showing $maxresults of \002$totalmatches\002 matches): $final_output"
+       } else {
+               set output(acronym) $final_output
+       }
       }
 
       # this returns our 'output' array

It's slightly ugly and could probably be better integrated elsewhere but I didn't want to muck things up too much. The result looks like:

LEO: (Showing 5 of 20 matches):

LMAO: (Showing 3 of 3 matches):
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Tue Nov 28, 2006 9:27 pm    Post subject: Reply with quote

It can be better to use [info exists total_matches] as if {$total_matches} will produce an error if it doesn't exist as a var. Yes, I realize you [set] it.

Thanks for the idea, I'll add it in for the next release. I have some plans brewing for all my scripts. Smile
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Wed Nov 29, 2006 5:11 am    Post subject: Reply with quote

Ohh I wish I knew how to do fancy scripting/programming like yours, mine's like beef stew compared to beef wellington! <grin>
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Wed Nov 29, 2006 5:38 pm    Post subject: Reply with quote

Oh please. I'm a newb coder. I just like sharing small tips like that, keeps everyone a bit more knowledged in the end Smile Helping you helping me.. heh!
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri Dec 08, 2006 2:57 pm    Post subject: Reply with quote

incith:acronym is dead! Got an e-mail with a subject of Cease and desist when I woke up today:

Cease and desist wrote:
Please stop writing and distributing scripts that illegally scrape the
copyrighted content of acronymfinder.com

This violates our terms of use and international copyright law.

Mike Molloy
AcronymFinder.com


So with that, I've asked slennox to remove incith:acronym from the Tcl archive, and I will not be publishing anymore versions of it.

Regards,

Update: I've e-mailed him back stating I would look into this matter further, as I don't believe you can copyright acronyms, nor do I believe he holds copyright to all the acronyms on that website nor do I believe that he could hold copyright to all the acronyms as their is a user submissions area. Further I do not believe scraping non-copyright material is illegal even with his terms of usage disclaimer. If anyone here is a lawyer or can shed further light on this, I'd be appreciative.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Dec 08, 2006 4:15 pm    Post subject: Reply with quote

First of all, email does NOT constitute proof of service, so I'd ignore the twits until you receive certified mail (and good luck to the twits finding your real name and address Razz) Those C&D letters are purely intimidation tactics. Go do a google search for "cease and desist letters" and you'll find plenty of forums devoted to the subject, and likely be able to get some legal info about how to fight the pricks. If you do get a certified letter with a properly worded C&D demand (research what is required for it to be legal), let us know.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Dec 08, 2006 4:24 pm    Post subject: Reply with quote

I just read their terms of service.. You're not violating them because you're not downloading, nor are you "automatically scraping" - you are doing what they allow - which is the same damn thing a webbrowser does.. So, call your script a webbrowser, it's a matter of semantics. About the only condition I see that you should comply with is:

All search results from this site must appear with the site's advertising and copyright information.

So put their stupid copyright into the script.. You should be able to explain to the twit what the script does (which is not automated) and obtain permission and give proper credit to their site, etc. They provide "free tools" for webbrowsers, so explain that your script is a "free tool" for irc.. There's very little difference.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Dec 08, 2006 4:29 pm    Post subject: Reply with quote

Ohh and as far as their advertising - I use adblock for mozilla so I do not even get their advertising - are they going to block me for not accepting their lame ads? heh..
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri Dec 08, 2006 4:56 pm    Post subject: Reply with quote

rosc, thanks for your replies and efforts. Before coming back here I also had the same thought, "My script is no more than a web-browser. A limited one."

I will make some changes to the script in a few days, perhaps advertising AcronymFinder.com: in the results.

I will add a section to the header with their copyright info, and perhaps display AcronymFinder.com in the results that get sent to the channel. I just don't want this to escalate really.

The e-mail also did not come from @acronymfinder.com, which leads me to believe it is ignore-worthy.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri Dec 08, 2006 5:06 pm    Post subject: Reply with quote

I am now being directed to http://acronymfinder.com/uselimit.asp when I attempt to search. *laugh*
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Dec 08, 2006 6:47 pm    Post subject: Reply with quote

Ohh geez they blacklisted you're ip? I just changed the user agent string, and I do get the html results in my putcmdlog debuggy thing, but the output is broke again, showing 0 results on the chan.. Heh I just got a "user limit exceeded" page whilst trying to debug..Ya know what, there are less ANAL RETENTIVE acronym databases freely available, so if this jitwad wants to do this kind of childish crap (Hey get a freakin life and quit reading weblogs ya dork) I suggest ya just use one of the MUCH MUCH BETTER FREE acronym sites:

http://acronyms.thefreedictionary.com/
http://en.wikipedia.org/wiki/Acronym
http://www.all-acronyms.com/
http://www.acronymsearch.com/index.php
http://www.google.com/search?hl=en&q=acronyms&btnG=Google+Search

and so on and on and on.. Mikey isn't the only game in town.

Who needs that dorky spam-ridden site anyway <thinks Mike Molloy needs to get a new hobby>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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