You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2015/05/07 03:48:59 UTC

[jira] [Commented] (TIKA-1620) OUTPUT_FILE_TOKEN not being replaced in ExternalParser

    [ https://issues.apache.org/jira/browse/TIKA-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14531872#comment-14531872 ] 

Hudson commented on TIKA-1620:
------------------------------

SUCCESS: Integrated in tika-trunk-jdk1.7 #672 (See [https://builds.apache.org/job/tika-trunk-jdk1.7/672/])
OUTPUT_FILE_TOKEN not being replaced in ExternalParser contributed by Pascal Essiembre TIKA-1620 (mattmann: http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1678118)
* /tika/trunk/CHANGES.txt
- fix for TIKA-1620: OUTPUT_FILE_TOKEN not being replaced in ExternalParser contributed by Pascal Essiembre (mattmann: http://svn.apache.org/viewvc/tika/trunk/?view=rev&rev=1678117)
* /tika/trunk/tika-core/src/main/java/org/apache/tika/parser/external/ExternalParser.java


> OUTPUT_FILE_TOKEN not being replaced in ExternalParser
> ------------------------------------------------------
>
>                 Key: TIKA-1620
>                 URL: https://issues.apache.org/jira/browse/TIKA-1620
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.7, 1.8
>         Environment: Any.
>            Reporter: Pascal Essiembre
>             Fix For: 1.9
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> According to class documentation, the  {{org.apache.tika.parser.external.ExternalParser}} class should replace the {{OUTPUT_FILE_TOKEN}} constant with an output file name when specified as a command argument.  It is currently not the case and the parser will fail to grab any output from processes generating output files.
> In order to fix this, you should add one line to the following code in the parse method (starting on line 168):
> {code:java}
> if(cmd[i].indexOf(OUTPUT_FILE_TOKEN) != -1) {
>     output = tmp.createTemporaryFile();
>     outputFromStdOut = false;
>     //START FIX:
>     cmd[i] = cmd[i].replace(OUTPUT_FILE_TOKEN, output.getPath());
>     //END FIX.
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)