htdig: Geoff - title length


Charlie Romero (charlie@jumpinternet.com)
Sun, 27 Dec 1998 18:24:36 -0500


Geoff,

About two weeks ago you posted the following reply to a question about
limiting title length:

Question

what would be the best way to limit the size of the output of a title?
I am indexing the homepages on an isp and some of the users have really
really really really long titles for whatever reason, and editing thier
pages is not an option. I've read most of the documentation and can't
seem to find anything on this.
I'd like to keep the title down to 5-8 words if i could or a certain
number of bytes or characters..

Thanks for any help you all can give

Tom Douglas

Reply

If you don't mind patching the code, it's pretty easy. You'd go into
htdig/Retriever.cc and look for the "Retriever::got_title" method. Then you
put in a test for the length of the title and insert a null in the
appropriate place if it's too long.

I'd supply a short patch, but I should get back to work.
Good luck!

-Geoff Hutchison

I can't seem to figure it out, I am a complete newbie. Can you supply a
patch when you get a chance.

So you don't have to look for it here is the original snippet of code you
mentioned.

//*****************************************************************************
// void Retriever::got_title(char *title)
//
void
Retriever::got_title(char *title)
{
    if (debug > 1)
        cout << "\ntitle: " << title << endl;
    current_title = title;
}

//*****************************************************************************

Thanks,

Charlie

______________________________________________________________________
Charlie Romero
Director of Corporate Development
(703) 299-3585
charlie@jumpinternet.com
______________________________________________________________________
                       J U M P I N T E R N E T

INFORMATION MANAGEMENT SYSTEMS INTERNET/INTRANET SOLUTIONS

                      http://www.jumpinternet.com
______________________________________________________________________

----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:29:56 PST