Skip to content

Commit a44c67b

Browse files
authored
Merge pull request #25 from baughmann/feat/tika-4
feat: upgrade bundled Apache Tika 3.2.3 → 3.3.1
2 parents 1618de1 + f92a0cd commit a44c67b

5 files changed

Lines changed: 27 additions & 4 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
UV := uv run
22
# Also update TIKA_VERSION in src/tikara/util/java.py to match
3-
TIKA_VERSION := 3.2.3
3+
TIKA_VERSION := 3.3.1
44
TIKA_JAR := src/tikara/jars/tika-app-$(TIKA_VERSION).jar
55

66
.DEFAULT_GOAL := help

‎SUPPORTED_MIME_TYPES.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,7 @@
13061306
- `image/aces`
13071307
- `image/avif`
13081308
- `image/bmp`
1309+
- `image/bmp; format=compressed`
13091310
- `image/cgm`
13101311
- `image/emf`
13111312
- `image/example`
@@ -1481,6 +1482,7 @@
14811482
- `text/html`
14821483
- `text/iso19139+xml`
14831484
- `text/javascript`
1485+
- `text/markdown`
14841486
- `text/parityfec`
14851487
- `text/plain`
14861488
- `text/prs.fallenstein.rst`
@@ -1597,7 +1599,6 @@
15971599
- `text/x-vcard`
15981600
- `text/x-verilog`
15991601
- `text/x-vhdl`
1600-
- `text/x-web-markdown`
16011602
- `text/x-yacc`
16021603
- `text/x-yaml`
16031604
- `video/3gpp`

‎src/tikara/util/java.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
# JVM utilities
2828
#
29-
TIKA_VERSION = "3.2.3"
29+
TIKA_VERSION = "3.3.1"
3030

3131

3232
def get_jars() -> list[Path]:

‎test/test_unpack.py‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,31 @@
1010
from tikara.data_types import TikaUnpackResult
1111
from tikara.error_handling import TikaError
1212

13+
# Each level of test_recursive_embedded.docx nests a further zip, so raising max_depth
14+
# must strictly widen the result. Tika <= 3.2.3 stopped after the first child of
15+
# embed1.zip and returned the same three files for every depth >= 2; the depth-3 case
16+
# below is what pins the recursion down.
1317
UNPACK_RECURSIVE_TEST_CASES: list[tuple[str, list[str], int]] = [
1418
("test_recursive_embedded_docx", ["embed1.zip", "image1.emf"], 1),
15-
("test_recursive_embedded_docx", ["embed1.zip", "image1.emf", "embed1/embed1a.txt"], 2),
19+
(
20+
"test_recursive_embedded_docx",
21+
["embed1.zip", "image1.emf", "embed1/embed1a.txt", "embed1/embed1b.txt", "embed1/embed2.zip"],
22+
2,
23+
),
24+
(
25+
"test_recursive_embedded_docx",
26+
[
27+
"embed1.zip",
28+
"image1.emf",
29+
"embed1/embed1a.txt",
30+
"embed1/embed1b.txt",
31+
"embed1/embed2.zip",
32+
"embed2/embed2a.txt",
33+
"embed2/embed2b.txt",
34+
"embed2/embed3.zip",
35+
],
36+
3,
37+
),
1638
("demo_docx", ["image2.png", "image3.png", "image4.png"], 1),
1739
("demo_docx", ["image2.png", "image3.png", "image4.png"], 2),
1840
("basic_txt", [], 1),

0 commit comments

Comments
 (0)