htdig: Geoff - title length

Charlie Romero (
Sun, 27 Dec 1998 18:24:36 -0500


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


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


If you don't mind patching the code, it's pretty easy. You'd go into
htdig/ 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

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




Charlie Romero
Director of Corporate Development
(703) 299-3585
                       J U M P I N T E R N E T



To unsubscribe from the htdig mailing list, send a message to 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