tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick C (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TIKA-1513) Add mime detection and parsing for dbf files
Date Mon, 18 Apr 2016 03:09:25 GMT

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

Nick C edited comment on TIKA-1513 at 4/18/16 3:09 AM:
-------------------------------------------------------

Did some more testing and simplified the rules enough that it could be made in to a regex.
It's not pretty but works. It checks the signature/version, month(1-12), day(1-31), header
length > 65, record length > 1, and first field's type (could be stricter)
{code:xml}
<magic priority="100">
<match value="(?s)^[\\x02\\x03\\x30\\x31\\x32\\x43\\x63\\x83\\x8B\\xCB\\xF5\\xE5\\xFB].[\\x01-\\x0C][\\x01-\\x1F].{4}(?:.[^\\x00]|[\\x41-\\xFF].)(?:[^\\x00\\x01].|.[^\\x00]).{31}[A-Z@+]"
type="regex" offset="0"/>
</magic>
{code}


was (Author: nicholasc):
Did some more testing and simplified the rules enough that it could be made in to a regex.
It's not pretty but works. It checks the signature/version, month(1-12), day(1-31), header
length > 65, record length > 1, and first field's type (could be stricter)
<magic priority="100">
<match value="(?s)^[\\x02\\x03\\x30\\x31\\x32\\x43\\x63\\x83\\x8B\\xCB\\xF5\\xE5\\xFB].[\\x01-\\x0C][\\x01-\\x1F].{4}(?:.[^\\x00]|[\\x41-\\xFF].)(?:[^\\x00\\x01].|.[^\\x00]).{31}[A-Z@+]"
type="regex" offset="0"/>
</magic>

> Add mime detection and parsing for dbf files
> --------------------------------------------
>
>                 Key: TIKA-1513
>                 URL: https://issues.apache.org/jira/browse/TIKA-1513
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Tim Allison
>            Priority: Minor
>             Fix For: 1.13
>
>
> I just came across an Apache licensed dbf parser that is available on [maven|https://repo1.maven.org/maven2/org/jamel/dbf/dbf-reader/0.1.0/dbf-reader-0.1.0.pom].
> Let's add dbf parsing to Tika.
> Any other recommendations for alternate parsers?



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

Mime
View raw message