md4kb 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. md4kb-0.1.0/.gitignore +6 -0
  2. md4kb-0.1.0/LICENSE +21 -0
  3. md4kb-0.1.0/PKG-INFO +118 -0
  4. md4kb-0.1.0/README.md +80 -0
  5. md4kb-0.1.0/pyproject.toml +105 -0
  6. md4kb-0.1.0/src/md4kb/__init__.py +1 -0
  7. md4kb-0.1.0/src/md4kb/__main__.py +6 -0
  8. md4kb-0.1.0/src/md4kb/app/__init__.py +4 -0
  9. md4kb-0.1.0/src/md4kb/app/archives.py +380 -0
  10. md4kb-0.1.0/src/md4kb/app/cache.py +151 -0
  11. md4kb-0.1.0/src/md4kb/app/embedded.py +66 -0
  12. md4kb-0.1.0/src/md4kb/app/files.py +156 -0
  13. md4kb-0.1.0/src/md4kb/app/files_folder.py +69 -0
  14. md4kb-0.1.0/src/md4kb/app/markdown.py +73 -0
  15. md4kb-0.1.0/src/md4kb/app/programs.py +68 -0
  16. md4kb-0.1.0/src/md4kb/app/readers.py +258 -0
  17. md4kb-0.1.0/src/md4kb/app/run.py +381 -0
  18. md4kb-0.1.0/src/md4kb/app/settings.py +166 -0
  19. md4kb-0.1.0/src/md4kb/app/sources.py +290 -0
  20. md4kb-0.1.0/src/md4kb/app/state.py +231 -0
  21. md4kb-0.1.0/src/md4kb/app/supervised.py +106 -0
  22. md4kb-0.1.0/src/md4kb/app/supervisor.py +348 -0
  23. md4kb-0.1.0/src/md4kb/app/unpack.py +400 -0
  24. md4kb-0.1.0/src/md4kb/app/worker.py +358 -0
  25. md4kb-0.1.0/src/md4kb/cli/__init__.py +5 -0
  26. md4kb-0.1.0/src/md4kb/cli/main.py +266 -0
  27. md4kb-0.1.0/src/md4kb/cli/manifest.py +179 -0
  28. md4kb-0.1.0/src/md4kb/cli/output.py +213 -0
  29. md4kb-0.1.0/src/md4kb/core/__init__.py +4 -0
  30. md4kb-0.1.0/src/md4kb/core/charts.py +35 -0
  31. md4kb-0.1.0/src/md4kb/core/drawings.py +42 -0
  32. md4kb-0.1.0/src/md4kb/core/embedded.py +190 -0
  33. md4kb-0.1.0/src/md4kb/core/events.py +92 -0
  34. md4kb-0.1.0/src/md4kb/core/front_matter.py +212 -0
  35. md4kb-0.1.0/src/md4kb/core/gateway.py +37 -0
  36. md4kb-0.1.0/src/md4kb/core/kinds.py +276 -0
  37. md4kb-0.1.0/src/md4kb/core/markers.py +34 -0
  38. md4kb-0.1.0/src/md4kb/core/model.py +227 -0
  39. md4kb-0.1.0/src/md4kb/core/number_formats.py +367 -0
  40. md4kb-0.1.0/src/md4kb/core/office.py +342 -0
  41. md4kb-0.1.0/src/md4kb/core/parts.py +151 -0
  42. md4kb-0.1.0/src/md4kb/core/protocol.py +144 -0
  43. md4kb-0.1.0/src/md4kb/core/status.py +83 -0
  44. md4kb-0.1.0/src/md4kb/core/symbols.py +327 -0
  45. md4kb-0.1.0/src/md4kb/core/up_to_date.py +177 -0
  46. md4kb-0.1.0/src/md4kb/readers/__init__.py +1 -0
  47. md4kb-0.1.0/src/md4kb/readers/diagram.py +376 -0
  48. md4kb-0.1.0/src/md4kb/readers/diagram_nets.py +67 -0
  49. md4kb-0.1.0/src/md4kb/readers/docling.py +400 -0
  50. md4kb-0.1.0/src/md4kb/readers/drawings.py +191 -0
  51. md4kb-0.1.0/src/md4kb/readers/drawio.py +240 -0
  52. md4kb-0.1.0/src/md4kb/readers/drawio_cells.py +100 -0
  53. md4kb-0.1.0/src/md4kb/readers/drawio_page.py +16 -0
  54. md4kb-0.1.0/src/md4kb/readers/dxf.py +157 -0
  55. md4kb-0.1.0/src/md4kb/readers/embedded.py +275 -0
  56. md4kb-0.1.0/src/md4kb/readers/formulas.py +261 -0
  57. md4kb-0.1.0/src/md4kb/readers/furniture.py +105 -0
  58. md4kb-0.1.0/src/md4kb/readers/gateway.py +393 -0
  59. md4kb-0.1.0/src/md4kb/readers/images.py +199 -0
  60. md4kb-0.1.0/src/md4kb/readers/kept_files.py +58 -0
  61. md4kb-0.1.0/src/md4kb/readers/libreoffice.py +290 -0
  62. md4kb-0.1.0/src/md4kb/readers/links.py +366 -0
  63. md4kb-0.1.0/src/md4kb/readers/markdown.py +400 -0
  64. md4kb-0.1.0/src/md4kb/readers/metafiles.py +273 -0
  65. md4kb-0.1.0/src/md4kb/readers/netlist.py +321 -0
  66. md4kb-0.1.0/src/md4kb/readers/netlist_tables.py +91 -0
  67. md4kb-0.1.0/src/md4kb/readers/office.py +361 -0
  68. md4kb-0.1.0/src/md4kb/readers/office_links.py +230 -0
  69. md4kb-0.1.0/src/md4kb/readers/ooxml.py +324 -0
  70. md4kb-0.1.0/src/md4kb/readers/packages.py +64 -0
  71. md4kb-0.1.0/src/md4kb/readers/pages.py +124 -0
  72. md4kb-0.1.0/src/md4kb/readers/picture_labels.py +122 -0
  73. md4kb-0.1.0/src/md4kb/readers/pool.py +113 -0
  74. md4kb-0.1.0/src/md4kb/readers/record.py +69 -0
  75. md4kb-0.1.0/src/md4kb/readers/recordings.py +276 -0
  76. md4kb-0.1.0/src/md4kb/readers/scanned.py +251 -0
  77. md4kb-0.1.0/src/md4kb/readers/scans.py +224 -0
  78. md4kb-0.1.0/src/md4kb/readers/shapes.py +46 -0
  79. md4kb-0.1.0/src/md4kb/readers/sheet_links.py +109 -0
  80. md4kb-0.1.0/src/md4kb/readers/sheet_objects.py +159 -0
  81. md4kb-0.1.0/src/md4kb/readers/slide_diagrams.py +330 -0
  82. md4kb-0.1.0/src/md4kb/readers/slide_frames.py +146 -0
  83. md4kb-0.1.0/src/md4kb/readers/slide_furniture.py +259 -0
  84. md4kb-0.1.0/src/md4kb/readers/slide_gaps.py +285 -0
  85. md4kb-0.1.0/src/md4kb/readers/slide_order.py +125 -0
  86. md4kb-0.1.0/src/md4kb/readers/slide_shapes.py +338 -0
  87. md4kb-0.1.0/src/md4kb/readers/slide_texts.py +130 -0
  88. md4kb-0.1.0/src/md4kb/readers/slots.py +58 -0
  89. md4kb-0.1.0/src/md4kb/readers/speech.py +206 -0
  90. md4kb-0.1.0/src/md4kb/readers/spreadsheet.py +202 -0
  91. md4kb-0.1.0/src/md4kb/readers/symbols.py +206 -0
  92. md4kb-0.1.0/src/md4kb/readers/table_pictures.py +129 -0
  93. md4kb-0.1.0/src/md4kb/readers/tables.py +375 -0
  94. md4kb-0.1.0/src/md4kb/readers/texts.py +165 -0
  95. md4kb-0.1.0/src/md4kb/readers/together.py +81 -0
  96. md4kb-0.1.0/src/md4kb/readers/visio.py +105 -0
  97. md4kb-0.1.0/src/md4kb/readers/vision.py +400 -0
  98. md4kb-0.1.0/src/md4kb/readers/vlm.py +170 -0
md4kb-0.1.0/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ dist/
6
+ *.egg-info/
md4kb-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Peter Stein
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
md4kb-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.5
2
+ Name: md4kb
3
+ Version: 0.1.0
4
+ Summary: Turn documents into Markdown files next to them, for people and agents to search and read
5
+ Project-URL: Repository, https://gitlab.cern.ch/pestein/md4kb
6
+ Project-URL: Documentation, https://gitlab.cern.ch/pestein/md4kb/-/tree/main/docs/guide
7
+ Author: Peter Stein
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: docling,documents,knowledge-base,markdown,pdf,rag
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
19
+ Requires-Python: >=3.12
20
+ Requires-Dist: docling-core<2.106,>=2.105
21
+ Requires-Dist: docling-slim[format-opendocument]<2.144,>=2.143
22
+ Requires-Dist: docling<2.144,>=2.143
23
+ Requires-Dist: ezdxf>=1.4
24
+ Requires-Dist: fonttools>=4.60
25
+ Requires-Dist: httpx>=0.28
26
+ Requires-Dist: keyring>=25
27
+ Requires-Dist: libarchive-c>=5
28
+ Requires-Dist: lxml>=6.1
29
+ Requires-Dist: openpyxl>=3.1
30
+ Requires-Dist: pillow>=13
31
+ Requires-Dist: psutil>=7
32
+ Requires-Dist: pydantic>=2
33
+ Requires-Dist: pypdfium2>=5
34
+ Requires-Dist: pyyaml>=6
35
+ Requires-Dist: rich>=14
36
+ Requires-Dist: typer>=0.16
37
+ Description-Content-Type: text/markdown
38
+
39
+ <img src="https://gitlab.cern.ch/pestein/md4kb/-/raw/main/docs/logo/icon.svg" alt="" width="72">
40
+
41
+ # md4kb
42
+
43
+ Turns documents into Markdown, with their pictures, next to them: for
44
+ people, chat bots and agents to search and read. Any file, anywhere: an
45
+ EDMS download, a folder of meeting notes, a USB stick of drawings.
46
+
47
+ md4kb is a thin layer over [Docling](https://docling-project.github.io/docling/),
48
+ which reads the documents on your machine, and a gateway of vision and
49
+ speech models, which read what Docling cannot: scans, photos, formulas,
50
+ speech and, when asked, the text inside the pictures of a document. md4kb
51
+ adds what a knowledge base needs around them: walking folders, skipping
52
+ what is up to date, writing next to the source, front matter, archives,
53
+ and a manifest for other programs.
54
+
55
+ ## Start
56
+
57
+ ```bash
58
+ uv tool install --torch-backend cpu md4kb # or: pip install md4kb
59
+ md4kb ~/Downloads/status.pdf # writes status.pdf.md and status.pdf.files/
60
+ md4kb ~/papers ~/notes # every source in both folders, recursively
61
+ ```
62
+
63
+ It runs on Linux with Python 3.12 or later; macOS is untested, and
64
+ Windows does not work. Without any setup it converts what Docling reads
65
+ on its own, text PDFs and Office files among them, and sends no document
66
+ anywhere.
67
+
68
+ Scans, photos, formulas and recordings need the gateway and a key for it,
69
+ in `AIGW_API_KEY` or the desktop keyring; without one md4kb leaves those
70
+ for a run that has it. The gateway is CERN's (`aigw.cern.ch`) unless you
71
+ name another: any service that answers OpenAI's `/chat/completions` and
72
+ `/audio/transcriptions`, with its address and its models in
73
+ `~/.config/md4kb/config.toml` ([Use](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/use.md)).
74
+ LibreOffice, `ffmpeg` and libarchive open the files that need them;
75
+ [Install](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/install.md) says which.
76
+
77
+ A second run converts only what is new or changed. This is the start of
78
+ `status.pdf.md`:
79
+
80
+ ```markdown
81
+ ---
82
+ md4kb_source: status.pdf
83
+ md4kb_source_sha256: cab328eb7f72e2149d7813301fae0dde50365f9b7f10c8cc3c0133918af78aed
84
+ md4kb_read_with: docling 2.143.1
85
+ md4kb_reader_options: 834ca818066a
86
+ md4kb_converted: 2026-11-08
87
+ md4kb_status: ok
88
+ ---
89
+
90
+ <!-- md4kb:page 1 -->
91
+
92
+ ## TE/EPC status report March 2012
93
+
94
+ <!-- md4kb:page 2 -->
95
+
96
+ ![Image](status.pdf.files/2-1.png)
97
+ <!-- md4kb:text-in-image
98
+ Content
99
+ -->
100
+ ```
101
+
102
+ ## More
103
+
104
+ | To | Read |
105
+ | --- | --- |
106
+ | Install, the gateway key and the programs md4kb uses | [Install](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/install.md) |
107
+ | Run it, its options and settings, exit codes, its own data | [Use](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/use.md) |
108
+ | Read the Markdown, the files folder and the front matter | [What you get](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/markdown.md) |
109
+ | See which files it reads and how | [What it converts](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/sources.md) |
110
+ | Call it from another program | [For programs](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/programs.md) |
111
+
112
+ `md4kb --help` lists every option. The words it uses are in the
113
+ [glossary](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/GLOSSARY.md), its decisions in
114
+ [docs/adr/](https://gitlab.cern.ch/pestein/md4kb/-/tree/main/docs/adr).
115
+
116
+ ## Licence
117
+
118
+ MIT, copyright Peter Stein; see [LICENSE](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/LICENSE).
md4kb-0.1.0/README.md ADDED
@@ -0,0 +1,80 @@
1
+ <img src="https://gitlab.cern.ch/pestein/md4kb/-/raw/main/docs/logo/icon.svg" alt="" width="72">
2
+
3
+ # md4kb
4
+
5
+ Turns documents into Markdown, with their pictures, next to them: for
6
+ people, chat bots and agents to search and read. Any file, anywhere: an
7
+ EDMS download, a folder of meeting notes, a USB stick of drawings.
8
+
9
+ md4kb is a thin layer over [Docling](https://docling-project.github.io/docling/),
10
+ which reads the documents on your machine, and a gateway of vision and
11
+ speech models, which read what Docling cannot: scans, photos, formulas,
12
+ speech and, when asked, the text inside the pictures of a document. md4kb
13
+ adds what a knowledge base needs around them: walking folders, skipping
14
+ what is up to date, writing next to the source, front matter, archives,
15
+ and a manifest for other programs.
16
+
17
+ ## Start
18
+
19
+ ```bash
20
+ uv tool install --torch-backend cpu md4kb # or: pip install md4kb
21
+ md4kb ~/Downloads/status.pdf # writes status.pdf.md and status.pdf.files/
22
+ md4kb ~/papers ~/notes # every source in both folders, recursively
23
+ ```
24
+
25
+ It runs on Linux with Python 3.12 or later; macOS is untested, and
26
+ Windows does not work. Without any setup it converts what Docling reads
27
+ on its own, text PDFs and Office files among them, and sends no document
28
+ anywhere.
29
+
30
+ Scans, photos, formulas and recordings need the gateway and a key for it,
31
+ in `AIGW_API_KEY` or the desktop keyring; without one md4kb leaves those
32
+ for a run that has it. The gateway is CERN's (`aigw.cern.ch`) unless you
33
+ name another: any service that answers OpenAI's `/chat/completions` and
34
+ `/audio/transcriptions`, with its address and its models in
35
+ `~/.config/md4kb/config.toml` ([Use](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/use.md)).
36
+ LibreOffice, `ffmpeg` and libarchive open the files that need them;
37
+ [Install](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/install.md) says which.
38
+
39
+ A second run converts only what is new or changed. This is the start of
40
+ `status.pdf.md`:
41
+
42
+ ```markdown
43
+ ---
44
+ md4kb_source: status.pdf
45
+ md4kb_source_sha256: cab328eb7f72e2149d7813301fae0dde50365f9b7f10c8cc3c0133918af78aed
46
+ md4kb_read_with: docling 2.143.1
47
+ md4kb_reader_options: 834ca818066a
48
+ md4kb_converted: 2026-11-08
49
+ md4kb_status: ok
50
+ ---
51
+
52
+ <!-- md4kb:page 1 -->
53
+
54
+ ## TE/EPC status report March 2012
55
+
56
+ <!-- md4kb:page 2 -->
57
+
58
+ ![Image](status.pdf.files/2-1.png)
59
+ <!-- md4kb:text-in-image
60
+ Content
61
+ -->
62
+ ```
63
+
64
+ ## More
65
+
66
+ | To | Read |
67
+ | --- | --- |
68
+ | Install, the gateway key and the programs md4kb uses | [Install](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/install.md) |
69
+ | Run it, its options and settings, exit codes, its own data | [Use](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/use.md) |
70
+ | Read the Markdown, the files folder and the front matter | [What you get](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/markdown.md) |
71
+ | See which files it reads and how | [What it converts](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/sources.md) |
72
+ | Call it from another program | [For programs](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/docs/guide/programs.md) |
73
+
74
+ `md4kb --help` lists every option. The words it uses are in the
75
+ [glossary](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/GLOSSARY.md), its decisions in
76
+ [docs/adr/](https://gitlab.cern.ch/pestein/md4kb/-/tree/main/docs/adr).
77
+
78
+ ## Licence
79
+
80
+ MIT, copyright Peter Stein; see [LICENSE](https://gitlab.cern.ch/pestein/md4kb/-/blob/main/LICENSE).
@@ -0,0 +1,105 @@
1
+ [project]
2
+ name = "md4kb"
3
+ version = "0.1.0"
4
+ description = "Turn documents into Markdown files next to them, for people and agents to search and read"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ authors = [{ name = "Peter Stein" }]
9
+ requires-python = ">=3.12"
10
+ keywords = ["markdown", "documents", "pdf", "docling", "knowledge-base", "rag"]
11
+ classifiers = [
12
+ "Development Status :: 4 - Beta",
13
+ "Environment :: Console",
14
+ "Operating System :: POSIX :: Linux",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Programming Language :: Python :: 3.14",
19
+ "Topic :: Text Processing :: Markup :: Markdown",
20
+ ]
21
+ dependencies = [
22
+ "typer>=0.16",
23
+ "rich>=14",
24
+ "pyyaml>=6",
25
+ # The physical cores and the free memory a run divides among its
26
+ # workers, and the processes a worker over its time limit is killed with.
27
+ "psutil>=7",
28
+ # A spreadsheet's measuring and cutting before Docling loads it, and the
29
+ # values as its sheets show them.
30
+ "openpyxl>=3.1",
31
+ # Docling with its standard readers and models; torch comes with it.
32
+ # Held to the version md4kb is tried with: md4kb builds on names inside
33
+ # Docling that a later one may change, among them the one that keeps a
34
+ # picture from being sent by Docling's own client.
35
+ "docling>=2.143,<2.144",
36
+ # Docling's OpenDocument reader, which its standard set leaves out; it
37
+ # reads an OpenDocument file that LibreOffice could not copy.
38
+ "docling-slim[format-opendocument]>=2.143,<2.144",
39
+ # Docling's document model and serializers, which render a cached
40
+ # document without Docling's models; tests build documents with it.
41
+ "docling-core>=2.105,<2.106",
42
+ # The models Docling's options and documents are built on: md4kb's
43
+ # serializer keeps private state on one, and the gateway's readers pass
44
+ # its URL type.
45
+ "pydantic>=2",
46
+ "libarchive-c>=5",
47
+ "ezdxf>=1.4",
48
+ # Pillow, which Docling uses too, for the copy an image is read from.
49
+ "pillow>=13",
50
+ # The gateway's HTTP client, and the desktop keyring that holds its key.
51
+ "httpx>=0.28",
52
+ "keyring>=25",
53
+ # A PDF's page labels, links and symbol fonts, its page sizes, whether
54
+ # it is a scan, and drawing pages and metafile PDFs rendered
55
+ # (running.md, "Packaging and checks").
56
+ "pypdfium2>=5",
57
+ # The Adobe Glyph List, through which Symbol's characters are mapped.
58
+ "fonttools>=4.60",
59
+ # The place of each file embedded in a Word or PowerPoint file, marked
60
+ # in the copy Docling reads.
61
+ "lxml>=6.1",
62
+ ]
63
+
64
+ [project.scripts]
65
+ md4kb = "md4kb.cli:main"
66
+
67
+ [project.urls]
68
+ Repository = "https://gitlab.cern.ch/pestein/md4kb"
69
+ Documentation = "https://gitlab.cern.ch/pestein/md4kb/-/tree/main/docs/guide"
70
+
71
+ [build-system]
72
+ requires = ["hatchling"]
73
+ build-backend = "hatchling.build"
74
+
75
+ # The source archive holds what builds the package and no more: the
76
+ # tests, the benchmarks, the documents and the agents' instructions stay
77
+ # in the repository.
78
+ [tool.hatch.build.targets.sdist]
79
+ include = ["src", "README.md", "LICENSE", "pyproject.toml"]
80
+
81
+ [dependency-groups]
82
+ dev = [
83
+ "pytest>=8",
84
+ "ruff>=0.12",
85
+ "ty>=0.0.1",
86
+ "types-lxml>=2026.2.16",
87
+ ]
88
+
89
+ [tool.ruff]
90
+ target-version = "py312"
91
+
92
+ [tool.ruff.lint]
93
+ select = ["E", "F", "I", "UP", "B"]
94
+
95
+ [tool.pytest.ini_options]
96
+ testpaths = ["tests"]
97
+
98
+ [tool.ty.environment]
99
+ python-version = "3.12"
100
+
101
+ # CI installs no Docling (.gitlab-ci.yml, HEAVY_PACKAGES), and so no torch or
102
+ # model packages; Docling's imports pass unresolved there and are checked on
103
+ # a full checkout.
104
+ [tool.ty.analysis]
105
+ allowed-unresolved-imports = ["docling", "docling.**"]
@@ -0,0 +1 @@
1
+ """md4kb: turn documents into Markdown files next to them."""
@@ -0,0 +1,6 @@
1
+ """Run md4kb as `python -m md4kb`, the way callers start it."""
2
+
3
+ from md4kb.cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()
@@ -0,0 +1,4 @@
1
+ """The run: supervisor, workers, cache, state and settings.
2
+
3
+ Imports `md4kb.core` and `md4kb.readers`.
4
+ """