tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Meikle <loo...@gmail.com>
Subject Re: Executing file inside Parser
Date Thu, 02 Aug 2012 22:08:17 GMT
Hi,

On 2 Aug 2012, at 08:50, 122jxgcn <ywpark90@gmail.com> wrote:

> I'm trying to execute binary file inside my custom parser.
> I put binary file on directory
> 
> tika-parsers/src/main/resources/bin/hwp2xml.bin

Have you thought about using the External Parser support?  You can take a look at it in org.apache.tika.parser.external.ExternalParser[1].

From the file name it looks like you may be converting between formats to ease parsing but
this could offer an alternative allowing you to map patterns for metadata and content extraction
via the tika-external-parsers.xml[2] configuration file.

If it isn't a viable option, this is still a good example on how you could execute an external
command using Tika, because as Nick's suggests you will need have this executable located
externally or extract it outside the JAR.

Cheers,
Dave

[1] http://svn.apache.org/repos/asf/tika/trunk/tika-core/src/main/java/org/apache/tika/parser/external/ExternalParser.java

[2] http://svn.apache.org/repos/asf/tika/trunk/tika-parsers/src/main/resources/org/apache/tika/parser/external/tika-external-parsers.xml
Mime
View raw message