Re: Htdig and MHT files

"Ainhoa L" <[email protected]> Mon, 11 Feb 2008 10:32:43 +0100
Newsgroups gmane.comp.web.htdig.general
Message-ID <[email protected]>
--===============1961096692==
Content-Type: multipart/alternative; 
	boundary="----=_Part_26841_21548208.1202722363827"

------=_Part_26841_21548208.1202722363827
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

On Feb 8, 2008 12:58 PM, <[email protected]> wrote:

>  Ainhoa,
> Can I ask you to check whether _new_ PDF's are getting indexed correctly?
>
> I notice that the syntax used in the very first, commented, line of the
> external_parsers  section looks different to the rest:
>
> application/pdf->text/html /usr/local/bin/conv_doc.pl
>
> Note the 'arrow' and mime-type bit after application/pdf. All of the
> external_parsers  declarations in my config have this same bit, which makes
> me suspect that none of your declarations will be working just now, though
> if you have not rebuilt your databases from scratch this may not be obvious.
> You probably want to be using at least -vv  (two letter v's) to get verbose
> output from the dig process - this should tell you what is happening during
> the indexing. My other thought is to check whether the mht files are being
> served to you with that mime-type - this won't work correctly if not, and
> you may need more than one  external_parsers  declaration to cover all
> possibilities.
>
> Regards,
> Mike
>
>  ------------------------------
> *From:* Ainhoa L [mailto:[email protected]]
> *Sent:* Wednesday, February 06, 2008 5:29 PM
> *To:* Brockington,MJ,Michael,JPGA4X R
> *Cc:* [email protected]
> *Subject:* Re: [htdig] Htdig and MHT files
>
>   Hi Mike,
>
> You are talking about the version with the mht parser, right?
> I write here an extract of where I mention mht things and I attach the
> whole file and the parser (originally the parser would create files for the
> files appearing in the mht. I modified it so it will only output the code in
> the htm file). Maybe this parser I modified is sending some other garbage
> that can't be read by the indexer?
>
> bad_extensions: .wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \
> .jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg .mov .avi .css
>
> valid_extensions: .html .htm .shtml .php .uhtml .phtml .txt .pdf .mht
>
> external_parsers: application/postscript /usr/local/apache/htdocs/htdig-
> 3.1.6/contrib/parsepdf.pl\ application/pdf /usr/local/apache/htdocs/htdig-
> 3.1.6/contrib/parsepdf.pl \ application/mht /opt/vin/mht2html2.pl
>
> Thanks a lot for your help!
> Regards,
>
> Ainhoa
>
>
>
> On Feb 5, 2008 9:58 PM, <[email protected]> wrote:
>
> > Can you show us at least an extract of your config file - as you
> > describe it this should work.
> >
> > Regards,
> > Mike
> >
> >
> > -----Original Message-----
> > From: [email protected] on behalf of Ainhoa L
> > Sent: Tue 2/5/2008 4:09 PM
> > To: [email protected]
> > Subject: [htdig] Htdig and MHT files
> >
> > Hi! Maybe this is a very stupid question but, is it possible to index
> > mht
> > files with htdig?
> > I have tried with the mht in the valid_extensions list, etc. Obviously
> > htdig
> > doesn't take them as html and refuses to index them. I looked for a
> > parser
> > and found a mht2html parser, modified it so it just sends through output
> > the
> > html. I added it to the parsers in the htdig config file. This didn't
> > work,
> > although the parser returns valid html...
> > I would like to know if there is any way to index mht files with htdig?
> > Thanks a lot for your help.
> >
> >
>

------=_Part_26841_21548208.1202722363827
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>Hi Mike,</div>
<div>Yes you were right, I was missing that part and I didn&#39;t even noticed!<br>I changed the config file and wrote this:</div><font size="2">
<p>application/pdf-&gt;text/html /usr/local/apache/htdocs/htdig-3.1.6/contrib/parsepdf.pl \</p>
<p>application/vnd.wap.xhtml+xml-&gt;text/html /opt/vin/mht2html.pl</p>
<div></div></font>vnd.wap.xhtml+xml was the MIME type for my mht documents. 
<div>So&nbsp;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>&nbsp;</div>
<div>(I am doing this in a test folder)</div>
<div>&nbsp;</div>
<div>But when I go to the search page, it won&#39;t find words inside the mht files. It works for the pdf, txt and html ones, but can&#39;t find the words that are in the mht ones.</div>
<div>&nbsp;</div>
<div>I suppose I am missing something here... do I need to setup any other settings for the search engine?</div>
<div>&nbsp;</div>
<div>Thanks a lot for all your help,</div>
<div>&nbsp;</div>
<div>Ainhoa</div>
<div>&nbsp;</div>
<div class="gmail_quote">On Feb 8, 2008 12:58 PM, &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Ainhoa,</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Can I ask you to check whether _new_ PDF&#39;s are getting indexed correctly?</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">I notice that the syntax used in the very first, commented, line of the&nbsp; external_parsers&nbsp; section looks different to the rest:</font></span></div>

<div dir="ltr" align="left"><span>
<p><font size="2">application/pdf-&gt;text/html /usr/local/bin/conv_doc.pl</font></p>
<p><span><font face="Arial" color="#0000ff" size="2">Note the &#39;arrow&#39; and mime-type bit after application/pdf. All of the&nbsp; external_parsers&nbsp; declarations in my config have this same bit, which makes me suspect that none of your declarations will be working just now, though if you have not rebuilt your databases from scratch this may not be obvious. You probably want to be using at least&nbsp;-vv&nbsp; (two letter v&#39;s) to get verbose output from the dig process - this should tell you what is happening during the indexing. My other thought is to check whether the mht files are being served to you with that mime-type - this won&#39;t work correctly if not, and you may need more than one&nbsp; external_parsers&nbsp; declaration to cover all possibilities.</font></span></p
 >

<p><span><font face="Arial" color="#0000ff" size="2">Regards,<br>Mike</font></span></p></span></div><br>
<blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> Ainhoa L [mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>] <br><b>Sent:</b> Wednesday, February 06, 2008 5:29 PM<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></font><br></div>
<div>
<div></div>
<div class="Wj3C7c">
<div></div>
<div>Hi Mike,</div>
<div>&nbsp;</div>
<div>You are talking about the version with the mht parser, right?</div>
<div>I write here an extract of where I mention mht things and I attach the whole file and the parser (originally the parser would create files for the files appearing in the mht. I modified it so it will only output the code in the htm file). Maybe this parser I modified is sending some other garbage that can&#39;t be read by the indexer?</div>
<font size="2">
<div>&nbsp;</div>
<div>bad_extensions: .wav .gz .z .sit .au .zip .tar .hqx .exe .com .gif \</div>
<div>.jpg .jpeg .aiff .class .map .ram .tgz .bin .rpm .mpg .mov .avi .css </div>
<div>&nbsp;</div>
<div>valid_extensions: .html .htm .shtml .php .uhtml .phtml .txt .pdf .mht </div>
<div>&nbsp;</div>
<div></div></font><font size="2">external_parsers: application/postscript /usr/local/apache/htdocs/htdig-3.1.6/contrib/parsepdf.pl\ application/pdf /usr/local/apache/htdocs/htdig-3.1.6/contrib/parsepdf.pl \</font> 
<div><font size="2">application/mht /opt/vin/mht2html2.pl</font></div>
<div>&nbsp;</div>
<div>Thanks a lot for your help!</div>
<div>Regards,</div>
<div>&nbsp;</div>
<div>Ainhoa</div>
<div><br><br>&nbsp;</div>
<div class="gmail_quote">On Feb 5, 2008 9:58 PM, &lt;<a href="mailto:[email protected]" target="_blank">[email protected]</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Can you show us at least an extract of your config file - as you describe it this should work.<br><br>Regards,<br>
Mike<br>
<div>
<div></div>
<div><br><br>-----Original Message-----<br>From: <a href="mailto:[email protected]" target="_blank">[email protected]</a> on behalf of Ainhoa L<br>Sent: Tue 2/5/2008 4:09 PM<br>
To: <a href="mailto:[email protected]" target="_blank">[email protected]</a><br>Subject: [htdig] Htdig and MHT files<br><br>Hi! Maybe this is a very stupid question but, is it possible to index mht<br>
files with htdig?<br>I have tried with the mht in the valid_extensions list, etc. Obviously htdig<br>doesn&#39;t take them as html and refuses to index them. I looked for a parser<br>and found a mht2html parser, modified it so it just sends through output the<br>
html. I added it to the parsers in the htdig config file. This didn&#39;t work,<br>although the parser returns valid html...<br>I would like to know if there is any way to index mht files with htdig?<br>Thanks a lot for your help.<br>
<br></div></div></blockquote></div><br></div></div></blockquote></div></blockquote></div><br>

------=_Part_26841_21548208.1202722363827--


--===============1961096692==
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/
--===============1961096692==
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
--===============1961096692==--