Re: Htdig and MHT files
"Ainhoa L" <[email protected]> Mon, 11 Feb 2008 19:12:52 +0100
| Newsgroups | gmane.comp.web.htdig.general |
|---|---|
| Message-ID | <[email protected]> |
--===============2139472003== Content-Type: multipart/alternative; boundary="----=_Part_29145_33476378.1202753572639" ------=_Part_29145_33476378.1202753572639 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! The file I sent you was the output of the mht2html conversor. Indexing MHT files like html didn't work and still doesn't work. I just realized this wasn't a parser but a conversor, so i changed the config file like this: application/vnd.wap.xhtml+xml /opt/vin/mht2html.pl which didn't work either and I got the same dig output as before. Also tried with that mht2html.pl program modified so it would output the list of words like its explained here: http://www.htdig.org/attrs.html#external_parsers Again that didn't work and I was left with same output for dig. I also tried using the -internal version. No luck either. I'm probably doing something very stupid or very wrong here, otherwise I don't understand.... Maybe it's the perl program? It seems its giving me some output that is not good or readable by htdig, but to me it seems like regular html, which should be able to be used by htdig to index. Sadly I don't know much perl, so I just modify little parts here and there and then I test the output is what I think it should be. Thanks! Ainhoa PS I got one of your messages twice, it wasn't the last one but I got it after that one. weird! On Feb 11, 2008 5:13 PM, <[email protected]> wrote: > Ainhoa, > I see what you mean - that certainly doesn't look quite right! > > Before we go any further, can I ask if you have tried indexing this file > as 'plain' HTML? I know that it doesn't look quite right, but it would > appear to me that the content should be okay for htdig's own html parser, if > things are set up correctly. Since we know that the config wasn't correct > (at first) for the mime-type etc it would be worth checking that over - no > point doing an MHT -> HTML translation if it is HTML to begin with! > > I am afraid that I don't have a working example, but > http://www.htdig.org/attrs.html#external_parsers describes how to target > a file at the internal parser > > Regards, > Mike > > PS None of my messages have been coming back to me via the list - have you > been getting one copy or two? > > > ------------------------------ > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Ainhoa L > *Sent:* Monday, February 11, 2008 3:19 PM > > *To:* Brockington,MJ,Michael,JPGA4X R > *Cc:* [email protected] > *Subject:* Re: [htdig] Htdig and MHT files > > Yeah you are right, I think it doesn't like the output at all. Instead of > the words it is taking as words: > word: Read@0 > word: 8192@33 > word: from@67 > word: document@100 > > :S > So I suppose htdig just doesn't really like the output of the parser. I'm > attaching the output of parser (executed manually) and the output of dig > just in case you have any more ideas :) > > Thanks a lot! > > Ainhoa > > > On Feb 11, 2008 12:16 PM, <[email protected]> wrote: > > > Ainhoa, > > My first instinct would now be to check the parser output - try adding > > another v to your config, (and possibly restricting your indexing to just > > this one file) and check the log output - it may be that htdig does not like > > the output from your PERL script. www.htdig.org explains what the > > output means. I seem to recall you saying that you had already tested that > > it ran on its own, but possibly there is something not right there, or a > > typo in the config that neither of us can see. > > > > Regards, > > Mike > > > > > > ------------------------------ > > *From:* Ainhoa L [mailto:[email protected]] > > *Sent:* Monday, February 11, 2008 9:33 AM > > *To:* Brockington,MJ,Michael,JPGA4X R > > *Cc:* [email protected] > > *Subject:* Re: [htdig] Htdig and MHT files > > > > Hi Mike, > > Yes you were right, I was missing that part and I didn't even noticed! > > I changed the config file and wrote this: > > > > application/pdf->text/html /usr/local/apache/htdocs/htdig-3.1.6/contrib/parsepdf.pl > > \ > > > > application/vnd.wap.xhtml+xml->text/html /opt/vin/mht2html.pl > > vnd.wap.xhtml+xml was the MIME type for my mht documents. So I run dig > > and everything seems to go fine, having at the end: > > > > > > 0/http://172.26.0.169/testdig/ > > 1/http://172.26.0.169/testdig/About_comments_eex3.mht > > 2/http://172.26.0.169/testdig/aster.pdf > > 3/http://172.26.0.169/testdig/beepmacro.mht > > 4/http://172.26.0.169/testdig/index.txt > > 5/http://172.26.0.169/testdig/test.html > > > > (I am doing this in a test folder) > > > > But when I go to the search page, it won't find words inside the mht > > files. It works for the pdf, txt and html ones, but can't find the words > > that are in the mht ones. > > > > I suppose I am missing something here... do I need to setup any other > > settings for the search engine? > > > > Thanks a lot for all your help, > > > > Ainhoa > > > > > ------=_Part_29145_33476378.1202753572639 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi!<br><br>The file I sent you was the output of the mht2html conversor. Indexing MHT files like html didn't work and still doesn't work. I just realized this wasn't a parser but a conversor, so i changed the config file like this:<br> application/vnd.wap.xhtml+xml /opt/vin/mht2html.pl<br>which didn't work either and I got the same dig output as before.<br>Also tried with that mht2html.pl program modified so it would output the list of words like its explained here:<a href="http://www.htdig.org/attrs.html#external_parsers">http://www.htdig.org/attrs.html#external_parsers</a><br> Again that didn't work and I was left with same output for dig.<br>I also tried using the -internal version. No luck either.<br>I'm probably doing something very stupid or very wrong here, otherwise I don't understand....<br> Maybe it's the perl program? It seems its giving me some output that is not good or readable by htdig, but to me it seems like regular html, which should be able to be used by htdig to index. Sadly I don't know much perl, so I just modify little parts here and there and then I test the output is what I think it should be.<br> <br>Thanks!<br><br>Ainhoa<br><br>PS I got one of your messages twice, it wasn't the last one but I got it after that one. weird!<br><br><br><br><div class="gmail_quote">On Feb 11, 2008 5:13 PM, <<a href="mailto:[email protected]">[email protected]</a>> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Ainhoa,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I see what you mean - that certainly doesn't look quite right!</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Before we go any further, can I ask if you have tried indexing this file as 'plain' HTML? I know that it doesn't look quite right, but it would appear to me that the content should be okay for htdig's own html parser, if things are set up correctly. Since we know that the config wasn't correct (at first) for the mime-type etc it would be worth checking that over - no point doing an MHT -> HTML translation if it is HTML to begin with!</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I am afraid that I don't have a working example, but <a href="http://www.htdig.org/attrs.html#external_parsers" target="_blank">http://www.htdig.org/attrs.html#external_parsers</a> describes how to target a file at the internal parser</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Regards,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Mike</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">PS None of my messages have been coming back to me via the list - have you been getting one copy or two?</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div><br> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div dir="ltr" align="left" lang="en-us"> <hr> <font face="Tahoma" size="2"><b>From:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a> [mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>] <b>On Behalf Of </b>Ainhoa L<br><b>Sent:</b> Monday, February 11, 2008 3:19 PM<div><div></div><div class="Wj3C7c"><br><b>To:</b> Brockington,MJ,Michael,JPGA4X R<br><b>Cc:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br><b>Subject:</b> Re: [htdig] Htdig and MHT files<br></div></div></font><br></div><div><div></div><div class="Wj3C7c"> <div></div>Yeah you are right, I think it doesn't like the output at all. Instead of the words it is taking as words: <br>word: Read@0<br>word: 8192@33<br>word: from@67<br>word: document@100<br><br>:S<br>So I suppose htdig just doesn't really like the output of the parser. I'm attaching the output of parser (executed manually) and the output of dig just in case you have any more ideas :)<br><br>Thanks a lot!<br><br>Ainhoa<br><br><br> <div class="gmail_quote">On Feb 11, 2008 12:16 PM, <<a href="mailto:[email protected]" target="_blank">[email protected]</a>> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Ainhoa,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">My first instinct would now be to check the parser output - try adding another v to your config, (and possibly restricting your indexing to just this one file) and check the log output - it may be that htdig does not like the output from your PERL script. <a href="http://www.htdig.org" target="_blank">www.htdig.org</a> explains what the output means. I seem to recall you saying that you had already tested that it ran on its own, but possibly there is something not right there, or a typo in the config that neither of us can see.</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Regards,</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Mike</font></span></div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div> <div dir="ltr" align="left"> <hr> </div> <div dir="ltr" align="left"><font face="Tahoma" size="2"> <div><b>From:</b> Ainhoa L [mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>] <br></div><b>Sent:</b> Monday, February 11, 2008 9:33 AM <div><br><b>To:</b> Brockington,MJ,Michael,JPGA4X R<br><b>Cc:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br><b>Subject:</b> Re: [htdig] Htdig and MHT files<br></div></font><br></div> <blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div></div> <div>Hi Mike,</div> <div> <div>Yes you were right, I was missing that part and I didn't even noticed!<br>I changed the config file and wrote this:</div><font size="2"> <p>application/pdf->text/html /usr/local/apache/htdocs/htdig-3.1.6/contrib/parsepdf.pl \</p> <p>application/vnd.wap.xhtml+xml->text/html /opt/vin/mht2html.pl</p> <div></div></font>vnd.wap.xhtml+xml was the MIME type for my mht documents. <div>So I run dig and everything seems to go fine, having at the end:</div> <div><br><br>0/http://172.26.0.169/testdig/<br>1/http://172.26.0.169/testdig/About_comments_eex3.mht<br>2/http://172.26.0.169/testdig/aster.pdf<br>3/http://172.26.0.169/testdig/beepmacro.mht<br>4/http://172.26.0.169/testdig/index.txt<br> 5/http://172.26.0.169/testdig/test.html</div> <div> </div> <div>(I am doing this in a test folder)</div> <div> </div> <div>But when I go to the search page, it won't find words inside the mht files. It works for the pdf, txt and html ones, but can't find the words that are in the mht ones.</div> <div> </div> <div>I suppose I am missing something here... do I need to setup any other settings for the search engine?</div> <div> </div> <div>Thanks a lot for all your help,</div> <div> </div> <div>Ainhoa</div></div></blockquote></div></blockquote></div><br></div></div></blockquote></div> </blockquote></div><br> ------=_Part_29145_33476378.1202753572639-- --===============2139472003== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============2139472003== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ht://Dig general mailing list: <[email protected]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general --===============2139472003==--