[Zope] Re: ExtDocument problem
Tim McLaughlin
tim@iterationzero.com
Fri, 14 Sep 2001 13:17:34 -0400
Not sure I understand the problem... I'm gonna forward it to the list to
see if someone else does. _get_filename should return the filename and
path as one string...
Tim
Vineet Ahuja wrote:
>=20
> good news its working now!=B0!!!!!!hurrae
> m sorry my converters path was not set:(:(
> but one last problem!!!
> i m not still able to get the path of the file from:-
>=20
> filename=3Dself._get_filename(self.filename)
> if c[0]:
> return popen('pdftotext -raw %s -' % filename).read()
> else:
> return ''
> filename is not able to provide path of the .pdf file.
> now what to do.i guess its the last step.
> regards
> vineet ahuja
>=20
> >From: Tim McLaughlin <tim@iterationzero.com>
> >Reply-To: tim@iterationzero.com
> >To: Vineet Ahuja <ahujavineet@hotmail.com>
> >Subject: Re: ExtDocument problem
> >Date: Fri, 14 Sep 2001 09:57:23 -0400
> >
> >OK, I think you hit the problem (and I wouldn't think of it cuz I use
> >Linux). Anyway, try hardcoding the path for pdftotext into the
> >converters in ExtDocument.py... ie.
> >
> >...
> >'application/pdf': ('c:\\xpdf\\pdftotext.exe -raw %s -', etc...
> >
> >Tim
> >
> >
> >Vineet Ahuja wrote:
> > >
> > > hi peppo,tim
> > >
> > > Even after upgrade the same thing is happening.
> > >
> > > something interesting:-
> > > i have put a small script in extensions direcrtory:-
> > >
> > > ---Example.py---
> > > from os import popen
> > > from os.path import join
> > > import string
> > > def hello(name=3D"world"):
> > > return popen('pdftotext -raw %s -' %join('test.pdf') ).read()
> > > ---Example.py----end
> > >
> > > And i am calling the hello with an external method.
> > > When i test that extrnal method:-
> > > now that is also not returning me anything i mean the progress bar =
keeps
> >on
> > > moving but nothing happens.
> > > But when u run that Example.py from dos with
> > > print popen('pdftotext -raw %s -' %join('test.pdf') ).read()
> > > then it gives me the text out put.
> > >
> > > One thing i would like to =B4tell u is that i have put the .exe for=
the
> > > pdftotext converter directly into the directories ExtFile and
> >ExtDocument
> > > and even the Extensions.
> > > Now what next u guys suggest me to do.
> > > Best regards,
> > > Vineet Ahuja
> > >
> > > >From: Tim McLaughlin <tim@iterationzero.com>
> > > >Reply-To: tim@iterationzero.com
> > > >To: Vineet Ahuja <ahujavineet@hotmail.com>
> > > >Subject: Re: ExtDocument problem
> > > >Date: Fri, 14 Sep 2001 09:06:05 -0400
> > > >
> > > >Upgrade to Extfile 1.1.2 and ExtDoc 0.3. I tested it on this conf=
ig
> >and
> > > >it worked fine :) Lemme know.
> > > >
> > > >Incidentally, are you in AI at MIT?
> > > >
> > > >Tim
> > > >
> > > >Vineet Ahuja wrote:
> > > > >
> > > > > ok..
> > > > > Yeah I am getting the text output on the dos promt when i run
> > > > > pdftotext test.pdf
> > > > >
> > > > > I am running the whole thing on NT.
> > > > > these are the versions:-
> > > > > ExtFile/ExtImage-1-1-0-beta3
> > > > > ExtDocument-0.2.0
> > > > > zope 2.4.0
> > > > > I have attached the test.pdf .
> > > > > Best Regards,
> > > > > Vineet Ahuja
> > > > >
> > > > > >From: Tim McLaughlin <tim@iterationzero.com>
> > > > > >Reply-To: tim@iterationzero.com
> > > > > >To: Vineet Ahuja <ahujavineet@hotmail.com>, zope@zope.org
> > > > > >Subject: Re: ExtDocument problem
> > > > > >Date: Fri, 14 Sep 2001 08:53:01 -0400
> > > > > >
> > > > > >That means that it is not returning anything or an empty strin=
g
> >('').
> > > > > >Try doing a pdftotext on the file in the shell, and see what i=
t
> > > > > >returns. If that works, then let me know what versions of Ext=
File
> >and
> > > > > >ExtDoc you have, and email me the pdf.
> > > > > >
> > > > > >Tim
> > > > > >
> > > > > >Vineet Ahuja wrote:
> > > > > > >
> > > > > > > Dear Tim,
> > > > > > > I called the link as u said:-
> > > > > > > http://localhost:8080/demo/impdemo/vin/PrincipiaSearchSourc=
e
> > > > > > > where vin is the instance of ExtDocument.
> > > > > > > as i call the link the progress bar seems to be keep on
> >pregressing
> > > >and
> > > > > > > nothing seems to happen.It seems to stuck.
> > > > > > > Now what could be the reason for this.?
> > > > > > > Regards,
> > > > > > > Vineet Ahuja
> > > > > > >
> > > > > > > >From: Tim McLaughlin <tim@iterationzero.com>
> > > > > > > >Reply-To: tim@iterationzero.com
> > > > > > > >To: Vineet Ahuja <ahujavineet@hotmail.com>, zope@zope.org
> > > > > > > >Subject: Re: ExtDocument problem
> > > > > > > >Date: Thu, 13 Sep 2001 11:14:50 -0400
> > > > > > > >
> > > > > > > >The catalog needs to be named "Catalog" not "CatalogAware"=
and
> >the
> > > >url
> > > > > > > >is ...
> > > > > > > >http://HOST/INSTANCE/PrincipiaSearchSource
> > > > > > > >
> > > > > > > >where HOST=3Dthe zope server
> > > > > > > >and INSTANCE=3Dthe instance of the ExtDocument including t=
he path
> > > >(ie.
> > > > > > > >"/papers/research.pdf")
> > > > > > > >
> > > > > > > >Tim
> > > > > > > >
> > > > > > > >Vineet Ahuja wrote:
> > > > > > > > >
> > > > > > > > > dear tim,
> > > > > > > > > i ahve renamed my catalog to CatalogAware but still it
> >doesnt
> > > >help.
> > > > > > > > > And I tried to test the method directly by:-
> > > > > > > > > >http://localhost:8080/extDocInstance/PrincipiaSearchSo=
urce
> > > > > > > > > but it says that the URl does not exist.
> > > > > > > > >
> > > > > > > > > And your second point I can not understand.The text ind=
ex in
> >the
> > > > > >catalog
> > > > > > > >is
> > > > > > > > > called as PrincipiaSearchSource.
> > > > > > > > > I m using all this over WindowsNt.
> > > > > > > > > Kindly help as its been now 2 days that I am struggelin=
g
> >with
> > > >the
> > > > > > > >problem.
> > > > > > > > > Best Regards,
> > > > > > > > > Vineet Ahuja
> > > > > > > > >
> > > > > > > > > >From: Tim McLaughlin <tim@iterationzero.com>
> > > > > > > > > >Reply-To: tim@iterationzero.com
> > > > > > > > > >To: Vineet Ahuja <ahujavineet@hotmail.com>, zope@zope.=
org
> > > > > > > > > >Subject: Re: ExtDocument problem
> > > > > > > > > >Date: Thu, 13 Sep 2001 09:03:25 -0400
> > > > > > > > > >
> > > > > > > > > >Vineet,
> > > > > > > > > >Is the catalog named 'Catalog' and acquirable to the
> >document?
> > > > > >(this
> > > > > > > > > >uses CatalogAware, and that's how it works) And secon=
dly,
> >is
> > > >the
> > > > > >Index
> > > > > > > > > >still called 'PrincipiaSearchSource', not Principle,
> >because
> > > >that
> > > > > >is
> > > > > > > >the
> > > > > > > > > >attribute name. You can test the functionality of the
> >method
> > > >by
> > > > > > > >calling
> > > > > > > > > >it on the ExtDocument like this...
> > > > > > > > > >
> > > > > > > > > >http://SERVER_NAME/extDocInstance/PrincipiaSearchSourc=
e
> > > > > > > > > >
> > > > > > > > > >and that should give you the "raw" data that will be
> >indexed.
> > > >If
> > > > > >it's
> > > > > > > > > >none of the above, let me know.
> > > > > > > > > >
> > > > > > > > > >--
> > > > > > > > > >Tim McLaughlin
> > > > > > > > > >iterationZERO - www.iterationzero.com
> > > > > > > > > >703.481.2233
> > > > > > > > > >
> > > > > > > > > >Vineet Ahuja wrote:
> > > > > > > > > > >
> > > > > > > > > > > Dear tim,
> > > > > > > > > > >
> > > > > > > > > > > I got ur email from zope mailing list.
> > > > > > > > > > > I am trying to index pdf files using ExtDocument.
> > > > > > > > > > > But as i add a pdf file from the management screen =
as an
> > > > > > > >ExtDocument,it
> > > > > > > > > >gets
> > > > > > > > > > > added successfully but when i catalog the ExtDocume=
nt
> >There
> > > >is
> > > > > > > >nothing
> > > > > > > > > >in
> > > > > > > > > > > the principle search source.
> > > > > > > > > > > I have installed the pdftotext successfully .
> > > > > > > > > > > But i dont know as to why still I am not getting
> >anything in
> > > >the
> > > > > > > > > >Principle
> > > > > > > > > > > SearchSource.
> > > > > > > > > > >
> > > > > > > > > > > Please Help me !!!
> > > > > > > > > > > Best Regards,
> > > > > > > > > > > Vineet Ahuja
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > >______________________________________________________________=
___
> > > > > > > > > > > Get your FREE download of MSN Explorer at
> > > > > > > > > >http://explorer.msn.com/intl.asp
> > > > > > > > >
> > > > > > > > >
> > > >_________________________________________________________________
> > > > > > > > > Get your FREE download of MSN Explorer at
> > > > > > > >http://explorer.msn.com/intl.asp
> > > > > > > >
> > > > > > > >--
> > > > > > > >Tim McLaughlin
> > > > > > > >iterationZERO - www.iterationzero.com
> > > > > > > >703.481.2233
> > > > > > >
> > > > > > >
> >_________________________________________________________________
> > > > > > > Get your FREE download of MSN Explorer at
> > > > > >http://explorer.msn.com/intl.asp
> > > > > >
> > > > > >--
> > > > > >Tim McLaughlin
> > > > > >iterationZERO - www.iterationzero.com
> > > > > >703.481.2233
> > > > >
> > > > > _______________________________________________________________=
__
> > > > > Get your FREE download of MSN Explorer at
> > > >http://explorer.msn.com/intl.asp
> > > > >
> > > > >
> > >
> > >--------------------------------------------------------------------=
----
> > > > > Name: test.pdf
> > > > > test.pdf Type: Portable Document Format
> >(application/pdf)
> > > > > Encoding: base64
> > > > > Download Status: Not downloaded with message
> > > >
> > > >--
> > > >Tim McLaughlin
> > > >iterationZERO - www.iterationzero.com
> > > >703.481.2233
> > >
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at
> >http://explorer.msn.com/intl.asp
> >
> >--
> >Tim McLaughlin
> >iterationZERO - www.iterationzero.com
> >703.481.2233
>=20
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.=
asp
--=20
Tim McLaughlin
iterationZERO - www.iterationzero.com
703.481.2233