robotframework-markitdown 0.2.1__tar.gz → 0.2.2__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 (50) hide show
  1. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/CHANGELOG.md +7 -0
  2. robotframework_markitdown-0.2.2/PKG-INFO +167 -0
  3. robotframework_markitdown-0.2.2/README.md +143 -0
  4. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/docs/MarkItDownLibrary.html +1 -1
  5. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/docs/index.html +5 -5
  6. robotframework_markitdown-0.2.2/src/MarkItDownLibrary/version.py +1 -0
  7. robotframework_markitdown-0.2.1/PKG-INFO +0 -218
  8. robotframework_markitdown-0.2.1/README.md +0 -194
  9. robotframework_markitdown-0.2.1/src/MarkItDownLibrary/version.py +0 -1
  10. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/.gitattributes +0 -0
  11. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/.github/workflows/publish.yml +0 -0
  12. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/.gitignore +0 -0
  13. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/LICENSE +0 -0
  14. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/docx.robot +0 -0
  15. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/contract_form_blank.pdf +0 -0
  16. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/contract_form_filled.pdf +0 -0
  17. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/contract_text_blank.pdf +0 -0
  18. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/contract_text_filled.pdf +0 -0
  19. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/deck.pptx +0 -0
  20. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/invoice.xlsx +0 -0
  21. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/page.html +0 -0
  22. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/fixtures/table.docx +0 -0
  23. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/html.robot +0 -0
  24. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/pdf.robot +0 -0
  25. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/pptx.robot +0 -0
  26. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/resources/common.resource +0 -0
  27. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/text_csv.robot +0 -0
  28. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/atest/xlsx.robot +0 -0
  29. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/docs/fonts/OFL.txt +0 -0
  30. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/docs/fonts/bricolage-grotesque.woff2 +0 -0
  31. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/docs/fonts/fragment-mono.woff2 +0 -0
  32. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/pyproject.toml +0 -0
  33. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/requirements-dev.lock +0 -0
  34. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/__init__.py +0 -0
  35. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/acroform.py +0 -0
  36. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/detect.py +0 -0
  37. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/fields.py +0 -0
  38. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/guard.py +0 -0
  39. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/library.py +0 -0
  40. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/tables.py +0 -0
  41. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/src/MarkItDownLibrary/text.py +0 -0
  42. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/tools/make_fixtures.py +0 -0
  43. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/fixtures/page.html +0 -0
  44. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_assertions.py +0 -0
  45. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_convert.py +0 -0
  46. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_detect.py +0 -0
  47. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_field_keywords.py +0 -0
  48. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_fields.py +0 -0
  49. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_tables.py +0 -0
  50. {robotframework_markitdown-0.2.1 → robotframework_markitdown-0.2.2}/utest/test_text.py +0 -0
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project are recorded here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## 0.2.2 - 2026-12-06
7
+
8
+ ### Changed
9
+
10
+ - The README installs from PyPI and is shorter. The PyPI page shows it.
11
+ - `PLAN.md` records the sniffing shortcut and the Python 3.10 to 3.14 range.
12
+
6
13
  ## 0.2.1 - 2026-12-06
7
14
 
8
15
  ### Changed
@@ -0,0 +1,167 @@
1
+ Metadata-Version: 2.5
2
+ Name: robotframework-markitdown
3
+ Version: 0.2.2
4
+ Summary: Robot Framework library that converts documents to Markdown with MarkItDown, offline, and checks their text
5
+ Project-URL: Source, https://github.com/ai94iq/robotframework-markitdown
6
+ Project-URL: Issues, https://github.com/ai94iq/robotframework-markitdown/issues
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: docx,markdown,markitdown,pdf,robotframework,testing,xlsx
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Framework :: Robot Framework
12
+ Classifier: Framework :: Robot Framework :: Library
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Requires-Python: <3.15,>=3.10
19
+ Requires-Dist: markitdown[docx,pdf,pptx,xlsx]==0.1.10
20
+ Requires-Dist: robotframework==7.5.1
21
+ Provides-Extra: acroform
22
+ Requires-Dist: pypdf==7.2.0; extra == 'acroform'
23
+ Description-Content-Type: text/markdown
24
+
25
+ # robotframework-markitdown
26
+
27
+ Robot Framework keywords that read PDF, DOCX, XLSX, PPTX and HTML files as
28
+ Markdown, then check their text, tables and field values. Conversion uses
29
+ Microsoft MarkItDown and runs offline.
30
+
31
+ Project site: <https://ai94iq.github.io/robotframework-markitdown/>
32
+
33
+ ## Install
34
+
35
+ Requires Python 3.10 to 3.14. pip installs Robot Framework 7.5.1 and
36
+ MarkItDown 0.1.10.
37
+
38
+ ```sh
39
+ pip install robotframework-markitdown
40
+ ```
41
+
42
+ For AcroForm (fillable PDF) field values, add the `acroform` extra, which
43
+ installs pypdf:
44
+
45
+ ```sh
46
+ pip install "robotframework-markitdown[acroform]"
47
+ ```
48
+
49
+ Package page: <https://pypi.org/project/robotframework-markitdown/>
50
+
51
+ ## Example
52
+
53
+ ```robotframework
54
+ *** Settings ***
55
+ Library RequestsLibrary
56
+ Library MarkItDownLibrary
57
+
58
+ *** Test Cases ***
59
+ New Contract Has No Total Amount
60
+ ${resp}= GET On Session api /contracts/${id}/pdf
61
+ ${md}= Convert Bytes To Markdown ${resp.content} .pdf
62
+ Markdown Should Contain ${md} Onboarding Contract
63
+ Field Should Be Blank ${md} Total Amount
64
+
65
+ Invoice Sheet Totals
66
+ ${rows}= Get Sheet As Table ${OUTPUT DIR}/invoice.xlsx Summary
67
+ Should Be Equal ${rows}[0][Total] 0
68
+ ```
69
+
70
+ ## Keywords
71
+
72
+ | Keyword | What it does |
73
+ |---|---|
74
+ | Convert File To Markdown | Converts a local file and returns the Markdown. |
75
+ | Convert Bytes To Markdown | Converts bytes, such as a response body. |
76
+ | Markdown Should Contain | Passes when the text is in the Markdown. |
77
+ | Markdown Should Not Contain | Passes when the text is not in the Markdown. |
78
+ | Markdown Should Match Regexp | Passes when a multiline regexp matches. |
79
+ | Get Tables From Markdown | Returns every pipe table as rows of cells. |
80
+ | Get Table From Markdown | Returns one table as rows keyed by its header. |
81
+ | Get Table Cell | Returns one cell by row number and column. |
82
+ | Get Field Value | Returns a labelled field's value, or `""` when blank. |
83
+ | Field Should Be | Passes when a labelled field has the expected value. |
84
+ | Field Should Be Blank | Passes when a labelled field is found and empty. |
85
+ | Pdf Field Should Be Blank | Checks a PDF form field, or the text when there is none. |
86
+ | Get Sheet Names | Returns the XLSX sheet names in workbook order. |
87
+ | Get Sheet As Table | Returns one XLSX sheet as rows keyed by header. |
88
+ | Set Converter Options | Sets the size cap and whether data URIs are kept. |
89
+ | Set Pdf Limits | Sets the PDF character limits MarkItDown enforces. |
90
+
91
+ Full keyword docs:
92
+ [MarkItDownLibrary.html](https://github.com/ai94iq/robotframework-markitdown/blob/main/docs/MarkItDownLibrary.html)
93
+
94
+ ## Offline and limits
95
+
96
+ - Only local files and bytes are converted. Paths starting with `file:`,
97
+ `http:`, `https:` or `data:` are refused.
98
+ - Plugins, LLM and Azure features are off.
99
+ - The default size cap is 50 MB; `Set Converter Options` changes it.
100
+ - Embedded data URIs are dropped unless `keep_data_uris` is set.
101
+ - A PDF over a character limit fails with a resource limit error. Defaults:
102
+ 100,000 characters a page, 2,000,000 in total, 10,000,000 in the output.
103
+ `Set Pdf Limits` changes them; a call with no arguments restores them.
104
+ - Images convert only when `exiftool` is on `PATH` or named in
105
+ `EXIFTOOL_PATH`; otherwise they convert to an empty string.
106
+ - For `.pdf`, `.docx`, `.xlsx` and `.pptx` the library trusts the file
107
+ extension and skips MarkItDown's content sniffing. A file with a wrong
108
+ extension for these formats is not re-identified. This swaps a private
109
+ MarkItDown attribute, so recheck it on each MarkItDown upgrade.
110
+
111
+ ## Field lookup
112
+
113
+ `Get Field Value`, `Field Should Be` and `Field Should Be Blank` find a label in
114
+ this order:
115
+
116
+ 1. A table row whose first cell is the label; the value is the second cell.
117
+ 2. A line that starts with the label and the separator (`:` by default); the
118
+ value is the text after it.
119
+ 3. Only with `next_line=True`: a line that is the label alone; the value is the
120
+ next non-empty line, or blank if that line ends with the separator or the
121
+ label is last.
122
+
123
+ `occurrence` picks the nth match (from 1) when a label repeats; past the last
124
+ match it fails and names the count. A label that is not found fails and shows
125
+ the closest lines.
126
+
127
+ `Pdf Field Should Be Blank` first looks for an AcroForm field with that name
128
+ (needs pypdf). If found, its value is checked. Otherwise, or without pypdf, the
129
+ check runs on the converted text with the rules above.
130
+
131
+ ## Measurements
132
+
133
+ Every number is from a run on 2026-12-06 (Windows, Python 3.13, MarkItDown
134
+ 0.1.10, pypdf 7.2.0). The plain read is pypdf `extract_text` over all pages.
135
+ Medians of 30 runs for the fixtures and 3 for the IRS forms.
136
+
137
+ | Check | Plain read | This library |
138
+ |---|---|---|
139
+ | Blank or filled, 4 fixtures in `atest/fixtures` | 3 of 4 | 4 of 4 |
140
+ | `contract_form_filled.pdf` (field value 250) | reads blank | reads filled |
141
+ | Conversion time, one-line fixtures | 0.52-0.53 ms | 2.11-2.20 ms |
142
+ | Conversion time, IRS W-9 (6 pages) | 55 ms | 2861 ms |
143
+ | Conversion time, IRS W-4 (5 pages) | 148 ms | 6912 ms |
144
+
145
+ The measurements support one claim: when a value lives in a form field, the
146
+ plain read can say blank and the library reads the value. They do not show a
147
+ size win (the Markdown is 1 to 2 characters longer on the one-line files) or a
148
+ speed win (the library is about 4 times slower on small files and much slower
149
+ on forms). Tokens were not measured. Four fixtures and two forms are a small
150
+ sample, and the forms have no known values beyond the one the test wrote.
151
+
152
+ ## Development
153
+
154
+ ```sh
155
+ uv pip install -e .[acroform]
156
+ python -m pytest
157
+ robot atest
158
+ pyright
159
+ python -m robot.libdoc MarkItDownLibrary docs/MarkItDownLibrary.html
160
+ ```
161
+
162
+ `pytest` runs `utest/`, `robot atest` runs `atest/`, `pyright` checks `src`,
163
+ `utest` and `tools` in strict mode, and the last command rebuilds `docs/`.
164
+
165
+ ## License
166
+
167
+ MIT.
@@ -0,0 +1,143 @@
1
+ # robotframework-markitdown
2
+
3
+ Robot Framework keywords that read PDF, DOCX, XLSX, PPTX and HTML files as
4
+ Markdown, then check their text, tables and field values. Conversion uses
5
+ Microsoft MarkItDown and runs offline.
6
+
7
+ Project site: <https://ai94iq.github.io/robotframework-markitdown/>
8
+
9
+ ## Install
10
+
11
+ Requires Python 3.10 to 3.14. pip installs Robot Framework 7.5.1 and
12
+ MarkItDown 0.1.10.
13
+
14
+ ```sh
15
+ pip install robotframework-markitdown
16
+ ```
17
+
18
+ For AcroForm (fillable PDF) field values, add the `acroform` extra, which
19
+ installs pypdf:
20
+
21
+ ```sh
22
+ pip install "robotframework-markitdown[acroform]"
23
+ ```
24
+
25
+ Package page: <https://pypi.org/project/robotframework-markitdown/>
26
+
27
+ ## Example
28
+
29
+ ```robotframework
30
+ *** Settings ***
31
+ Library RequestsLibrary
32
+ Library MarkItDownLibrary
33
+
34
+ *** Test Cases ***
35
+ New Contract Has No Total Amount
36
+ ${resp}= GET On Session api /contracts/${id}/pdf
37
+ ${md}= Convert Bytes To Markdown ${resp.content} .pdf
38
+ Markdown Should Contain ${md} Onboarding Contract
39
+ Field Should Be Blank ${md} Total Amount
40
+
41
+ Invoice Sheet Totals
42
+ ${rows}= Get Sheet As Table ${OUTPUT DIR}/invoice.xlsx Summary
43
+ Should Be Equal ${rows}[0][Total] 0
44
+ ```
45
+
46
+ ## Keywords
47
+
48
+ | Keyword | What it does |
49
+ |---|---|
50
+ | Convert File To Markdown | Converts a local file and returns the Markdown. |
51
+ | Convert Bytes To Markdown | Converts bytes, such as a response body. |
52
+ | Markdown Should Contain | Passes when the text is in the Markdown. |
53
+ | Markdown Should Not Contain | Passes when the text is not in the Markdown. |
54
+ | Markdown Should Match Regexp | Passes when a multiline regexp matches. |
55
+ | Get Tables From Markdown | Returns every pipe table as rows of cells. |
56
+ | Get Table From Markdown | Returns one table as rows keyed by its header. |
57
+ | Get Table Cell | Returns one cell by row number and column. |
58
+ | Get Field Value | Returns a labelled field's value, or `""` when blank. |
59
+ | Field Should Be | Passes when a labelled field has the expected value. |
60
+ | Field Should Be Blank | Passes when a labelled field is found and empty. |
61
+ | Pdf Field Should Be Blank | Checks a PDF form field, or the text when there is none. |
62
+ | Get Sheet Names | Returns the XLSX sheet names in workbook order. |
63
+ | Get Sheet As Table | Returns one XLSX sheet as rows keyed by header. |
64
+ | Set Converter Options | Sets the size cap and whether data URIs are kept. |
65
+ | Set Pdf Limits | Sets the PDF character limits MarkItDown enforces. |
66
+
67
+ Full keyword docs:
68
+ [MarkItDownLibrary.html](https://github.com/ai94iq/robotframework-markitdown/blob/main/docs/MarkItDownLibrary.html)
69
+
70
+ ## Offline and limits
71
+
72
+ - Only local files and bytes are converted. Paths starting with `file:`,
73
+ `http:`, `https:` or `data:` are refused.
74
+ - Plugins, LLM and Azure features are off.
75
+ - The default size cap is 50 MB; `Set Converter Options` changes it.
76
+ - Embedded data URIs are dropped unless `keep_data_uris` is set.
77
+ - A PDF over a character limit fails with a resource limit error. Defaults:
78
+ 100,000 characters a page, 2,000,000 in total, 10,000,000 in the output.
79
+ `Set Pdf Limits` changes them; a call with no arguments restores them.
80
+ - Images convert only when `exiftool` is on `PATH` or named in
81
+ `EXIFTOOL_PATH`; otherwise they convert to an empty string.
82
+ - For `.pdf`, `.docx`, `.xlsx` and `.pptx` the library trusts the file
83
+ extension and skips MarkItDown's content sniffing. A file with a wrong
84
+ extension for these formats is not re-identified. This swaps a private
85
+ MarkItDown attribute, so recheck it on each MarkItDown upgrade.
86
+
87
+ ## Field lookup
88
+
89
+ `Get Field Value`, `Field Should Be` and `Field Should Be Blank` find a label in
90
+ this order:
91
+
92
+ 1. A table row whose first cell is the label; the value is the second cell.
93
+ 2. A line that starts with the label and the separator (`:` by default); the
94
+ value is the text after it.
95
+ 3. Only with `next_line=True`: a line that is the label alone; the value is the
96
+ next non-empty line, or blank if that line ends with the separator or the
97
+ label is last.
98
+
99
+ `occurrence` picks the nth match (from 1) when a label repeats; past the last
100
+ match it fails and names the count. A label that is not found fails and shows
101
+ the closest lines.
102
+
103
+ `Pdf Field Should Be Blank` first looks for an AcroForm field with that name
104
+ (needs pypdf). If found, its value is checked. Otherwise, or without pypdf, the
105
+ check runs on the converted text with the rules above.
106
+
107
+ ## Measurements
108
+
109
+ Every number is from a run on 2026-12-06 (Windows, Python 3.13, MarkItDown
110
+ 0.1.10, pypdf 7.2.0). The plain read is pypdf `extract_text` over all pages.
111
+ Medians of 30 runs for the fixtures and 3 for the IRS forms.
112
+
113
+ | Check | Plain read | This library |
114
+ |---|---|---|
115
+ | Blank or filled, 4 fixtures in `atest/fixtures` | 3 of 4 | 4 of 4 |
116
+ | `contract_form_filled.pdf` (field value 250) | reads blank | reads filled |
117
+ | Conversion time, one-line fixtures | 0.52-0.53 ms | 2.11-2.20 ms |
118
+ | Conversion time, IRS W-9 (6 pages) | 55 ms | 2861 ms |
119
+ | Conversion time, IRS W-4 (5 pages) | 148 ms | 6912 ms |
120
+
121
+ The measurements support one claim: when a value lives in a form field, the
122
+ plain read can say blank and the library reads the value. They do not show a
123
+ size win (the Markdown is 1 to 2 characters longer on the one-line files) or a
124
+ speed win (the library is about 4 times slower on small files and much slower
125
+ on forms). Tokens were not measured. Four fixtures and two forms are a small
126
+ sample, and the forms have no known values beyond the one the test wrote.
127
+
128
+ ## Development
129
+
130
+ ```sh
131
+ uv pip install -e .[acroform]
132
+ python -m pytest
133
+ robot atest
134
+ pyright
135
+ python -m robot.libdoc MarkItDownLibrary docs/MarkItDownLibrary.html
136
+ ```
137
+
138
+ `pytest` runs `utest/`, `robot atest` runs `atest/`, `pyright` checks `src`,
139
+ `utest` and `tools` in strict mode, and the last command rebuilds `docs/`.
140
+
141
+ ## License
142
+
143
+ MIT.
@@ -6,7 +6,7 @@
6
6
  <meta http-equiv=X-UA-Compatible content="IE=edge">
7
7
  <meta content="Robot Framework 7.5.1 (Python 3.14.10 on win32)" name="Generator">
8
8
  <script type="text/javascript">
9
- libdoc = {"specversion": 4, "name": "MarkItDownLibrary", "doc": "<p>Converts local documents to Markdown with MarkItDown, offline.</p>\n<p>Only local files and in-memory bytes are converted; URLs and URI strings are refused, and plugins, LLM and Azure features stay off.</p>", "version": "0.2.1", "generated": "2026-12-06T04:25:44+00:00", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 19, "tags": [], "inits": [], "keywords": [{"name": "Convert Bytes To Markdown", "doc": "<p>Converts <code>data</code> to Markdown, using <code>extension</code> (for example <code>.pdf</code>) as the format hint.</p>", "shortdoc": "Converts ``data`` to Markdown, using ``extension`` (for example ``.pdf``) as the format hint.", "args": [{"name": "data", "doc": "", "type": {"name": "bytes", "typedoc": "bytes", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "data: bytes"}, {"name": "extension", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "extension: str"}, {"name": "encoding", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "encoding: str | None = None"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 52}, {"name": "Convert File To Markdown", "doc": "<p>Converts the local file <code>path</code> to Markdown and returns it.</p>", "shortdoc": "Converts the local file ``path`` to Markdown and returns it.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}, {"name": "encoding", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "encoding: str | None = None"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 41}, {"name": "Field Should Be", "doc": "<p>Fails unless field <code>label</code> has the value <code>expected</code>.</p>", "shortdoc": "Fails unless field ``label`` has the value ``expected``.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}, {"name": "expected", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "expected: str"}, {"name": "separator", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": ":", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "separator: str = :"}, {"name": "next_line", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "next_line: bool = False"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 148}, {"name": "Field Should Be Blank", "doc": "<p>Fails unless field <code>label</code> is found and blank.</p>", "shortdoc": "Fails unless field ``label`` is found and blank.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}, {"name": "separator", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": ":", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "separator: str = :"}, {"name": "next_line", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "next_line: bool = False"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 143}, {"name": "Get Field Value", "doc": "<p>Returns the value of field <code>label</code> ('' when blank); a missing label fails.</p>\n<p><code>occurrence</code> picks the nth match when the label repeats, counting from 1.</p>", "shortdoc": "Returns the value of field ``label`` ('' when blank); a missing label fails.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}, {"name": "separator", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": ":", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "separator: str = :"}, {"name": "next_line", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "next_line: bool = False"}, {"name": "occurrence", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "1", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "occurrence: int = 1"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 133}, {"name": "Get Sheet As Table", "doc": "<p>Returns one sheet as rows keyed by header; empty cells are blank and 12.0 reads as 12.</p>", "shortdoc": "Returns one sheet as rows keyed by header; empty cells are blank and 12.0 reads as 12.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}, {"name": "sheet", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "sheet: str"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "dict", "typedoc": "dictionary", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 171}, {"name": "Get Sheet Names", "doc": "<p>Returns the sheet names of an XLSX file in workbook order.</p>", "shortdoc": "Returns the sheet names of an XLSX file in workbook order.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 166}, {"name": "Get Table Cell", "doc": "<p>Returns the cell at body row <code>row</code> (0-based) and <code>column</code> (header name or 0-based number).</p>", "shortdoc": "Returns the cell at body row ``row`` (0-based) and ``column`` (header name or 0-based number).", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "row", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "row: int"}, {"name": "column", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "column: str | int"}, {"name": "table", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "0", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "table: int = 0"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 125}, {"name": "Get Table From Markdown", "doc": "<p>Returns one table as rows keyed by header; <code>header</code> picks the first table with that column.</p>", "shortdoc": "Returns one table as rows keyed by header; ``header`` picks the first table with that column.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "index", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "0", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "index: int = 0"}, {"name": "header", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "header: str | None = None"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "dict", "typedoc": "dictionary", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 120}, {"name": "Get Tables From Markdown", "doc": "<p>Returns every pipe table as rows of cells, header row first.</p>", "shortdoc": "Returns every pipe table as rows of cells, header row first.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "list", "typedoc": "list", "nested": [{"name": "list", "typedoc": "list", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 115}, {"name": "Markdown Should Contain", "doc": "<p>Fails unless <code>expected</code> is in <code>markdown</code>; the failure shows the 3 closest lines only.</p>", "shortdoc": "Fails unless ``expected`` is in ``markdown``; the failure shows the 3 closest lines only.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "expected", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "expected: str"}, {"name": "ignore_case", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "ignore_case: bool = False"}, {"name": "normalize_whitespace", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "True", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "normalize_whitespace: bool = True"}, {"name": "msg", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "msg: str | None = None"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 86}, {"name": "Markdown Should Match Regexp", "doc": "<p>Fails unless <code>pattern</code> matches (multiline mode); returns the matched text.</p>", "shortdoc": "Fails unless ``pattern`` matches (multiline mode); returns the matched text.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "pattern", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "pattern: str"}, {"name": "msg", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "msg: str | None = None"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 106}, {"name": "Markdown Should Not Contain", "doc": "<p>Fails when <code>expected</code> is in <code>markdown</code>; the failure shows the 3 lines where it was found.</p>", "shortdoc": "Fails when ``expected`` is in ``markdown``; the failure shows the 3 lines where it was found.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "expected", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "expected: str"}, {"name": "ignore_case", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "ignore_case: bool = False"}, {"name": "normalize_whitespace", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "True", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "normalize_whitespace: bool = True"}, {"name": "msg", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "msg: str | None = None"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 96}, {"name": "Pdf Field Should Be Blank", "doc": "<p>Checks a PDF form field when pypdf and an AcroForm are there, else the converted text.</p>", "shortdoc": "Checks a PDF form field when pypdf and an AcroForm are there, else the converted text.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 157}, {"name": "Set Converter Options", "doc": "<p>Sets whether embedded data URIs stay in the output and the largest document size in bytes.</p>", "shortdoc": "Sets whether embedded data URIs stay in the output and the largest document size in bytes.", "args": [{"name": "keep_data_uris", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "keep_data_uris: bool = False"}, {"name": "max_bytes", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "50000000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_bytes: int = 50000000"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 63}, {"name": "Set Pdf Limits", "doc": "<p>Sets the PDF character limits; a PDF over a limit fails with a resource limit error.</p>\n<p>Each call replaces all three limits, so a call with no arguments restores the defaults.</p>", "shortdoc": "Sets the PDF character limits; a PDF over a limit fails with a resource limit error.", "args": [{"name": "max_chars_per_page", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "100000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_chars_per_page: int = 100000"}, {"name": "max_total_chars", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "2000000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_total_chars: int = 2000000"}, {"name": "max_output_chars", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "10000000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_output_chars: int = 10000000"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 71}], "typedocs": [{"type": "Standard", "name": "boolean", "doc": "<p>Strings <code>TRUE</code>, <code>YES</code>, <code>ON</code>, <code>1</code> and possible localization specific \"true strings\" are converted to Boolean <code>True</code>, the empty string, strings <code>FALSE</code>, <code>NO</code>, <code>OFF</code> and <code>0</code> and possibly localization specific \"false strings\" are converted to Boolean <code>False</code>, and the string <code>NONE</code> is converted to the Python <code>None</code> object. Other strings and all other values are passed as-is, allowing keywords to handle them specially if needed. All string comparisons are case-insensitive.</p>\n<p>Examples: <code>TRUE</code> (converted to <code>True</code>), <code>off</code> (converted to <code>False</code>), <code>example</code> (used as-is)</p>", "usages": ["Field Should Be", "Field Should Be Blank", "Get Field Value", "Markdown Should Contain", "Markdown Should Not Contain", "Set Converter Options"], "accepts": ["string", "integer", "float", "None"]}, {"type": "Standard", "name": "bytes", "doc": "<p>Strings are converted to bytes so that each Unicode code point below 256 is directly mapped to a matching byte. Higher code points are not allowed. Robot Framework's <code>\\xHH</code> escape syntax is convenient with bytes having non-printable values.</p>\n<p>Examples: <code>good</code>, <code>hyv\u00e4</code> (same as <code>hyv\\xE4</code>), <code>\\x00</code> (the null byte)</p>\n<p>Integers and sequences of integers are converted to matching bytes directly. They must be in range 0-255.</p>\n<p>Examples: <code>0</code> (converted to the null byte), <code>[82, 70]</code> (converted to <code>RF</code>)</p>\n<p>Support for integers and sequences of integers is new in Robot Framework 7.4.</p>", "usages": ["Convert Bytes To Markdown"], "accepts": ["string", "bytearray", "Sequence", "integer"]}, {"type": "Standard", "name": "dictionary", "doc": "<p>Strings must be Python <a href=\"https://docs.python.org/library/stdtypes.html#dict\">dictionary</a> literals. They are converted to actual dictionaries using the <a href=\"https://docs.python.org/library/ast.html#ast.literal_eval\">ast.literal_eval</a> function. They can contain any values <code>ast.literal_eval</code> supports, including dictionaries and other collections.</p>\n<p>Any mapping is accepted and converted to a <code>dict</code>.</p>\n<p>If the type has nested types like <code>dict[str, int]</code>, items are converted to those types automatically. This in new in Robot Framework 6.0.</p>\n<p>Examples: <code>{'a': 1, 'b': 2}</code>, <code>{'key': 1, 'nested': {'key': 2}}</code></p>", "usages": ["Get Sheet As Table", "Get Table From Markdown"], "accepts": ["string", "Mapping"]}, {"type": "Standard", "name": "integer", "doc": "<p>Conversion is done using Python's <a href=\"https://docs.python.org/library/functions.html#int\">int</a> built-in function. Floating point numbers are accepted only if they can be represented as integers exactly. For example, <code>1.0</code> is accepted and <code>1.1</code> is not.</p>\n<p>It is possible to use hexadecimal, octal and binary numbers by prefixing values with <code>0x</code>, <code>0o</code> and <code>0b</code>, respectively. Spaces and underscores can be used as visual separators for digit grouping purposes.</p>\n<p>Examples: <code>42</code>, <code>-1</code>, <code>0b1010</code>, <code>10 000 000</code>, <code>0xBAD_C0FFEE</code></p>", "usages": ["Get Field Value", "Get Table Cell", "Get Table From Markdown", "Set Converter Options", "Set Pdf Limits"], "accepts": ["string", "float"]}, {"type": "Standard", "name": "list", "doc": "<p>Strings must be Python <a href=\"https://docs.python.org/library/stdtypes.html#list\">list</a> or <a href=\"https://docs.python.org/library/stdtypes.html#tuple\">tuple</a> literals. They are converted using the <a href=\"https://docs.python.org/library/ast.html#ast.literal_eval\">ast.literal_eval</a> function and possible tuples converted further to lists. They can contain any values <code>ast.literal_eval</code> supports, including lists and other collections.</p>\n<p>If the argument is a list, it is used without conversion. Tuples and other sequences are converted to lists.</p>\n<p>If the type has nested types like <code>list[int]</code>, items are converted to those types automatically.</p>\n<p>Examples: <code>['one', 'two']</code>, <code>[('one', 1), ('two', 2)]</code></p>\n<p>Support to convert nested types is new in Robot Framework 6.0. Support for tuple literals is new in Robot Framework 7.4.</p>", "usages": ["Get Sheet As Table", "Get Sheet Names", "Get Table From Markdown", "Get Tables From Markdown"], "accepts": ["string", "Sequence"]}, {"type": "Standard", "name": "None", "doc": "<p>String <code>NONE</code> (case-insensitive) and the empty string are converted to the Python <code>None</code> object. Other values cause an error.</p>\n<p>Converting the empty string is new in Robot Framework 7.4.</p>", "usages": ["Convert Bytes To Markdown", "Convert File To Markdown", "Field Should Be", "Field Should Be Blank", "Get Table From Markdown", "Markdown Should Contain", "Markdown Should Match Regexp", "Markdown Should Not Contain", "Pdf Field Should Be Blank", "Set Converter Options", "Set Pdf Limits"], "accepts": ["string"]}, {"type": "Standard", "name": "Path", "doc": "<p>Strings are converted <a href=\"https://docs.python.org/library/pathlib.html\">Path</a> objects. On Windows <code>/</code> is converted to <code>\\</code> automatically.</p>\n<p>Examples: <code>/tmp/absolute/path</code>, <code>relative/path/to/file.ext</code>, <code>name.txt</code></p>", "usages": ["Convert File To Markdown", "Get Sheet As Table", "Get Sheet Names", "Pdf Field Should Be Blank"], "accepts": ["string", "PurePath"]}, {"type": "Standard", "name": "string", "doc": "<p>All arguments are converted to Unicode strings.</p>\n<p>Most values are converted simply by using <code>str(value)</code>. An exception is that bytes are mapped directly to Unicode code points with same ordinals. This means that, for example, <code>b\"hyv\\xe4\"</code> becomes <code>\"hyv\u00e4\"</code>.</p>\n<p>Converting bytes specially is new Robot Framework 7.4.</p>", "usages": ["Convert Bytes To Markdown", "Convert File To Markdown", "Field Should Be", "Field Should Be Blank", "Get Field Value", "Get Sheet As Table", "Get Sheet Names", "Get Table Cell", "Get Table From Markdown", "Get Tables From Markdown", "Markdown Should Contain", "Markdown Should Match Regexp", "Markdown Should Not Contain", "Pdf Field Should Be Blank"], "accepts": ["Any"]}]}
9
+ libdoc = {"specversion": 4, "name": "MarkItDownLibrary", "doc": "<p>Converts local documents to Markdown with MarkItDown, offline.</p>\n<p>Only local files and in-memory bytes are converted; URLs and URI strings are refused, and plugins, LLM and Azure features stay off.</p>", "version": "0.2.2", "generated": "2026-12-06T04:34:48+00:00", "type": "LIBRARY", "scope": "GLOBAL", "docFormat": "HTML", "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 19, "tags": [], "inits": [], "keywords": [{"name": "Convert Bytes To Markdown", "doc": "<p>Converts <code>data</code> to Markdown, using <code>extension</code> (for example <code>.pdf</code>) as the format hint.</p>", "shortdoc": "Converts ``data`` to Markdown, using ``extension`` (for example ``.pdf``) as the format hint.", "args": [{"name": "data", "doc": "", "type": {"name": "bytes", "typedoc": "bytes", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "data: bytes"}, {"name": "extension", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "extension: str"}, {"name": "encoding", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "encoding: str | None = None"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 52}, {"name": "Convert File To Markdown", "doc": "<p>Converts the local file <code>path</code> to Markdown and returns it.</p>", "shortdoc": "Converts the local file ``path`` to Markdown and returns it.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}, {"name": "encoding", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "encoding: str | None = None"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 41}, {"name": "Field Should Be", "doc": "<p>Fails unless field <code>label</code> has the value <code>expected</code>.</p>", "shortdoc": "Fails unless field ``label`` has the value ``expected``.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}, {"name": "expected", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "expected: str"}, {"name": "separator", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": ":", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "separator: str = :"}, {"name": "next_line", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "next_line: bool = False"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 148}, {"name": "Field Should Be Blank", "doc": "<p>Fails unless field <code>label</code> is found and blank.</p>", "shortdoc": "Fails unless field ``label`` is found and blank.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}, {"name": "separator", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": ":", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "separator: str = :"}, {"name": "next_line", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "next_line: bool = False"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 143}, {"name": "Get Field Value", "doc": "<p>Returns the value of field <code>label</code> ('' when blank); a missing label fails.</p>\n<p><code>occurrence</code> picks the nth match when the label repeats, counting from 1.</p>", "shortdoc": "Returns the value of field ``label`` ('' when blank); a missing label fails.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}, {"name": "separator", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": ":", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "separator: str = :"}, {"name": "next_line", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "next_line: bool = False"}, {"name": "occurrence", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "1", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "occurrence: int = 1"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 133}, {"name": "Get Sheet As Table", "doc": "<p>Returns one sheet as rows keyed by header; empty cells are blank and 12.0 reads as 12.</p>", "shortdoc": "Returns one sheet as rows keyed by header; empty cells are blank and 12.0 reads as 12.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}, {"name": "sheet", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "sheet: str"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "dict", "typedoc": "dictionary", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 171}, {"name": "Get Sheet Names", "doc": "<p>Returns the sheet names of an XLSX file in workbook order.</p>", "shortdoc": "Returns the sheet names of an XLSX file in workbook order.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 166}, {"name": "Get Table Cell", "doc": "<p>Returns the cell at body row <code>row</code> (0-based) and <code>column</code> (header name or 0-based number).</p>", "shortdoc": "Returns the cell at body row ``row`` (0-based) and ``column`` (header name or 0-based number).", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "row", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "row: int"}, {"name": "column", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "column: str | int"}, {"name": "table", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "0", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "table: int = 0"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 125}, {"name": "Get Table From Markdown", "doc": "<p>Returns one table as rows keyed by header; <code>header</code> picks the first table with that column.</p>", "shortdoc": "Returns one table as rows keyed by header; ``header`` picks the first table with that column.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "index", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "0", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "index: int = 0"}, {"name": "header", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "header: str | None = None"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "dict", "typedoc": "dictionary", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 120}, {"name": "Get Tables From Markdown", "doc": "<p>Returns every pipe table as rows of cells, header row first.</p>", "shortdoc": "Returns every pipe table as rows of cells, header row first.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}], "returnType": {"name": "list", "typedoc": "list", "nested": [{"name": "list", "typedoc": "list", "nested": [{"name": "list", "typedoc": "list", "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 115}, {"name": "Markdown Should Contain", "doc": "<p>Fails unless <code>expected</code> is in <code>markdown</code>; the failure shows the 3 closest lines only.</p>", "shortdoc": "Fails unless ``expected`` is in ``markdown``; the failure shows the 3 closest lines only.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "expected", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "expected: str"}, {"name": "ignore_case", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "ignore_case: bool = False"}, {"name": "normalize_whitespace", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "True", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "normalize_whitespace: bool = True"}, {"name": "msg", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "msg: str | None = None"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 86}, {"name": "Markdown Should Match Regexp", "doc": "<p>Fails unless <code>pattern</code> matches (multiline mode); returns the matched text.</p>", "shortdoc": "Fails unless ``pattern`` matches (multiline mode); returns the matched text.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "pattern", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "pattern: str"}, {"name": "msg", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "msg: str | None = None"}], "returnType": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 106}, {"name": "Markdown Should Not Contain", "doc": "<p>Fails when <code>expected</code> is in <code>markdown</code>; the failure shows the 3 lines where it was found.</p>", "shortdoc": "Fails when ``expected`` is in ``markdown``; the failure shows the 3 lines where it was found.", "args": [{"name": "markdown", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "markdown: str"}, {"name": "expected", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "expected: str"}, {"name": "ignore_case", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "ignore_case: bool = False"}, {"name": "normalize_whitespace", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "True", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "normalize_whitespace: bool = True"}, {"name": "msg", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": "None", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "msg: str | None = None"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 96}, {"name": "Pdf Field Should Be Blank", "doc": "<p>Checks a PDF form field when pypdf and an AcroForm are there, else the converted text.</p>", "shortdoc": "Checks a PDF form field when pypdf and an AcroForm are there, else the converted text.", "args": [{"name": "path", "doc": "", "type": {"name": "Union", "typedoc": null, "nested": [{"name": "Path", "typedoc": "Path", "nested": [], "union": false, "alias": null}, {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}], "union": true, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "path: Path | str"}, {"name": "label", "doc": "", "type": {"name": "str", "typedoc": "string", "nested": [], "union": false, "alias": null}, "defaultValue": null, "kind": "POSITIONAL_OR_NAMED", "required": true, "repr": "label: str"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 157}, {"name": "Set Converter Options", "doc": "<p>Sets whether embedded data URIs stay in the output and the largest document size in bytes.</p>", "shortdoc": "Sets whether embedded data URIs stay in the output and the largest document size in bytes.", "args": [{"name": "keep_data_uris", "doc": "", "type": {"name": "bool", "typedoc": "boolean", "nested": [], "union": false, "alias": null}, "defaultValue": "False", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "keep_data_uris: bool = False"}, {"name": "max_bytes", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "50000000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_bytes: int = 50000000"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 63}, {"name": "Set Pdf Limits", "doc": "<p>Sets the PDF character limits; a PDF over a limit fails with a resource limit error.</p>\n<p>Each call replaces all three limits, so a call with no arguments restores the defaults.</p>", "shortdoc": "Sets the PDF character limits; a PDF over a limit fails with a resource limit error.", "args": [{"name": "max_chars_per_page", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "100000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_chars_per_page: int = 100000"}, {"name": "max_total_chars", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "2000000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_total_chars: int = 2000000"}, {"name": "max_output_chars", "doc": "", "type": {"name": "int", "typedoc": "integer", "nested": [], "union": false, "alias": null}, "defaultValue": "10000000", "kind": "POSITIONAL_OR_NAMED", "required": false, "repr": "max_output_chars: int = 10000000"}], "returnType": {"name": "None", "typedoc": "None", "nested": [], "union": false, "alias": null}, "returnDoc": "", "raises": {}, "tags": [], "source": "D:\\Work\\personal-git-clones\\robotframework-markitdown\\src\\MarkItDownLibrary\\library.py", "lineno": 71}], "typedocs": [{"type": "Standard", "name": "boolean", "doc": "<p>Strings <code>TRUE</code>, <code>YES</code>, <code>ON</code>, <code>1</code> and possible localization specific \"true strings\" are converted to Boolean <code>True</code>, the empty string, strings <code>FALSE</code>, <code>NO</code>, <code>OFF</code> and <code>0</code> and possibly localization specific \"false strings\" are converted to Boolean <code>False</code>, and the string <code>NONE</code> is converted to the Python <code>None</code> object. Other strings and all other values are passed as-is, allowing keywords to handle them specially if needed. All string comparisons are case-insensitive.</p>\n<p>Examples: <code>TRUE</code> (converted to <code>True</code>), <code>off</code> (converted to <code>False</code>), <code>example</code> (used as-is)</p>", "usages": ["Field Should Be", "Field Should Be Blank", "Get Field Value", "Markdown Should Contain", "Markdown Should Not Contain", "Set Converter Options"], "accepts": ["string", "integer", "float", "None"]}, {"type": "Standard", "name": "bytes", "doc": "<p>Strings are converted to bytes so that each Unicode code point below 256 is directly mapped to a matching byte. Higher code points are not allowed. Robot Framework's <code>\\xHH</code> escape syntax is convenient with bytes having non-printable values.</p>\n<p>Examples: <code>good</code>, <code>hyv\u00e4</code> (same as <code>hyv\\xE4</code>), <code>\\x00</code> (the null byte)</p>\n<p>Integers and sequences of integers are converted to matching bytes directly. They must be in range 0-255.</p>\n<p>Examples: <code>0</code> (converted to the null byte), <code>[82, 70]</code> (converted to <code>RF</code>)</p>\n<p>Support for integers and sequences of integers is new in Robot Framework 7.4.</p>", "usages": ["Convert Bytes To Markdown"], "accepts": ["string", "bytearray", "Sequence", "integer"]}, {"type": "Standard", "name": "dictionary", "doc": "<p>Strings must be Python <a href=\"https://docs.python.org/library/stdtypes.html#dict\">dictionary</a> literals. They are converted to actual dictionaries using the <a href=\"https://docs.python.org/library/ast.html#ast.literal_eval\">ast.literal_eval</a> function. They can contain any values <code>ast.literal_eval</code> supports, including dictionaries and other collections.</p>\n<p>Any mapping is accepted and converted to a <code>dict</code>.</p>\n<p>If the type has nested types like <code>dict[str, int]</code>, items are converted to those types automatically. This in new in Robot Framework 6.0.</p>\n<p>Examples: <code>{'a': 1, 'b': 2}</code>, <code>{'key': 1, 'nested': {'key': 2}}</code></p>", "usages": ["Get Sheet As Table", "Get Table From Markdown"], "accepts": ["string", "Mapping"]}, {"type": "Standard", "name": "integer", "doc": "<p>Conversion is done using Python's <a href=\"https://docs.python.org/library/functions.html#int\">int</a> built-in function. Floating point numbers are accepted only if they can be represented as integers exactly. For example, <code>1.0</code> is accepted and <code>1.1</code> is not.</p>\n<p>It is possible to use hexadecimal, octal and binary numbers by prefixing values with <code>0x</code>, <code>0o</code> and <code>0b</code>, respectively. Spaces and underscores can be used as visual separators for digit grouping purposes.</p>\n<p>Examples: <code>42</code>, <code>-1</code>, <code>0b1010</code>, <code>10 000 000</code>, <code>0xBAD_C0FFEE</code></p>", "usages": ["Get Field Value", "Get Table Cell", "Get Table From Markdown", "Set Converter Options", "Set Pdf Limits"], "accepts": ["string", "float"]}, {"type": "Standard", "name": "list", "doc": "<p>Strings must be Python <a href=\"https://docs.python.org/library/stdtypes.html#list\">list</a> or <a href=\"https://docs.python.org/library/stdtypes.html#tuple\">tuple</a> literals. They are converted using the <a href=\"https://docs.python.org/library/ast.html#ast.literal_eval\">ast.literal_eval</a> function and possible tuples converted further to lists. They can contain any values <code>ast.literal_eval</code> supports, including lists and other collections.</p>\n<p>If the argument is a list, it is used without conversion. Tuples and other sequences are converted to lists.</p>\n<p>If the type has nested types like <code>list[int]</code>, items are converted to those types automatically.</p>\n<p>Examples: <code>['one', 'two']</code>, <code>[('one', 1), ('two', 2)]</code></p>\n<p>Support to convert nested types is new in Robot Framework 6.0. Support for tuple literals is new in Robot Framework 7.4.</p>", "usages": ["Get Sheet As Table", "Get Sheet Names", "Get Table From Markdown", "Get Tables From Markdown"], "accepts": ["string", "Sequence"]}, {"type": "Standard", "name": "None", "doc": "<p>String <code>NONE</code> (case-insensitive) and the empty string are converted to the Python <code>None</code> object. Other values cause an error.</p>\n<p>Converting the empty string is new in Robot Framework 7.4.</p>", "usages": ["Convert Bytes To Markdown", "Convert File To Markdown", "Field Should Be", "Field Should Be Blank", "Get Table From Markdown", "Markdown Should Contain", "Markdown Should Match Regexp", "Markdown Should Not Contain", "Pdf Field Should Be Blank", "Set Converter Options", "Set Pdf Limits"], "accepts": ["string"]}, {"type": "Standard", "name": "Path", "doc": "<p>Strings are converted <a href=\"https://docs.python.org/library/pathlib.html\">Path</a> objects. On Windows <code>/</code> is converted to <code>\\</code> automatically.</p>\n<p>Examples: <code>/tmp/absolute/path</code>, <code>relative/path/to/file.ext</code>, <code>name.txt</code></p>", "usages": ["Convert File To Markdown", "Get Sheet As Table", "Get Sheet Names", "Pdf Field Should Be Blank"], "accepts": ["string", "PurePath"]}, {"type": "Standard", "name": "string", "doc": "<p>All arguments are converted to Unicode strings.</p>\n<p>Most values are converted simply by using <code>str(value)</code>. An exception is that bytes are mapped directly to Unicode code points with same ordinals. This means that, for example, <code>b\"hyv\\xe4\"</code> becomes <code>\"hyv\u00e4\"</code>.</p>\n<p>Converting bytes specially is new Robot Framework 7.4.</p>", "usages": ["Convert Bytes To Markdown", "Convert File To Markdown", "Field Should Be", "Field Should Be Blank", "Get Field Value", "Get Sheet As Table", "Get Sheet Names", "Get Table Cell", "Get Table From Markdown", "Get Tables From Markdown", "Markdown Should Contain", "Markdown Should Match Regexp", "Markdown Should Not Contain", "Pdf Field Should Be Blank"], "accepts": ["Any"]}]}
10
10
  </script>
11
11
  <link rel=icon type=image/x-icon href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKcAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAqAAAAAAAAAAAAAAAAAAAALIAAAD/AAAA4AAAANwAAADcAAAA3AAAANwAAADcAAAA3AAAANwAAADcAAAA4AAAAP8AAACxAAAAAAAAAKYAAAD/AAAAuwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC/AAAA/wAAAKkAAAD6AAAAzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN8AAAD/AAAA+gAAAMMAAAAAAAAAAgAAAGsAAABrAAAAawAAAGsAAABrAAAAawAAAGsAAABrAAAADAAAAAAAAADaAAAA/wAAAPoAAADDAAAAAAAAAIsAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANEAAAAAAAAA2gAAAP8AAAD6AAAAwwAAAAAAAAAAAAAAMgAAADIAAAAyAAAAMgAAADIAAAAyAAAAMgAAADIAAAAFAAAAAAAAANoAAAD/AAAA+gAAAMMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaAAAA/wAAAPoAAADDAAAAAAAAADwAAAB8AAAAAAAAAGAAAABcAAAAAAAAAH8AAABKAAAAAAAAAAAAAAAAAAAA2gAAAP8AAAD6AAAAwwAAAAAAAADCAAAA/wAAACkAAADqAAAA4QAAAAAAAAD7AAAA/wAAALAAAAAGAAAAAAAAANoAAAD/AAAA+gAAAMMAAAAAAAAAIwAAAP4AAAD/AAAA/wAAAGAAAAAAAAAAAAAAAMkAAAD/AAAAigAAAAAAAADaAAAA/wAAAPoAAADDAAAAAAAAAAAAAAAIAAAAcAAAABkAAAAAAAAAAAAAAAAAAAAAAAAAEgAAAAAAAAAAAAAA2gAAAP8AAAD7AAAAywAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN4AAAD/AAAAqwAAAP8AAACvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALIAAAD/AAAAsgAAAAAAAAC5AAAA/wAAAMoAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMkAAAD/AAAAvAAAAAAAAAAAAAAAAAAAAKwAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAArQAAAAAAAAAAwAMAAIABAAAf+AAAP/wAAD/8AAAgBAAAP/wAAD/8AAA//AAAJIwAADHEAAA//AAAP/wAAB/4AACAAQAAwAMAAA==">
12
12
  </head>
@@ -162,13 +162,13 @@ footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4p
162
162
  <h1>Read the document. Check the <mark class="hl">field.</mark></h1>
163
163
  <p class="lede">Robot Framework keywords that read PDF, DOCX, XLSX, PPTX and HTML files as Markdown, then check their text, tables and field values. Conversion uses Microsoft MarkItDown and runs offline.</p>
164
164
  <div class="actions">
165
- <button class="btn copy" type="button" data-copy="pip install git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0">
165
+ <button class="btn copy" type="button" data-copy="pip install robotframework-markitdown">
166
166
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></svg>
167
- pip install git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0
167
+ pip install robotframework-markitdown
168
168
  </button>
169
169
  </div>
170
170
  <p class="copied" role="status" aria-live="polite"></p>
171
- <p class="status">Not on PyPI yet, so install from GitHub. Python 3.10 to 3.14.</p>
171
+ <p class="status">On <a href="https://pypi.org/project/robotframework-markitdown/">PyPI</a>. Python 3.10 to 3.14.</p>
172
172
  </div>
173
173
 
174
174
  <div id="flow">
@@ -292,9 +292,9 @@ footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4p
292
292
  <div class="two">
293
293
  <div>
294
294
  <h3>Install</h3>
295
- <pre>pip install git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0</pre>
295
+ <pre>pip install robotframework-markitdown</pre>
296
296
  <p>For AcroForm field values, add the <code>acroform</code> extra:</p>
297
- <pre>pip install "robotframework-markitdown[acroform] @ git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0"</pre>
297
+ <pre>pip install "robotframework-markitdown[acroform]"</pre>
298
298
  </div>
299
299
  <div>
300
300
  <h3>Import</h3>
@@ -0,0 +1 @@
1
+ __version__ = "0.2.2"
@@ -1,218 +0,0 @@
1
- Metadata-Version: 2.5
2
- Name: robotframework-markitdown
3
- Version: 0.2.1
4
- Summary: Robot Framework library that converts documents to Markdown with MarkItDown, offline, and checks their text
5
- Project-URL: Source, https://github.com/ai94iq/robotframework-markitdown
6
- Project-URL: Issues, https://github.com/ai94iq/robotframework-markitdown/issues
7
- License-Expression: MIT
8
- License-File: LICENSE
9
- Keywords: docx,markdown,markitdown,pdf,robotframework,testing,xlsx
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Framework :: Robot Framework
12
- Classifier: Framework :: Robot Framework :: Library
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.14
17
- Classifier: Topic :: Software Development :: Testing
18
- Requires-Python: <3.15,>=3.10
19
- Requires-Dist: markitdown[docx,pdf,pptx,xlsx]==0.1.10
20
- Requires-Dist: robotframework==7.5.1
21
- Provides-Extra: acroform
22
- Requires-Dist: pypdf==7.2.0; extra == 'acroform'
23
- Description-Content-Type: text/markdown
24
-
25
- # robotframework-markitdown
26
-
27
- Robot Framework keywords that read PDF, DOCX, XLSX, PPTX and HTML files as
28
- Markdown, then check their text, tables and field values. Conversion uses
29
- Microsoft MarkItDown and runs offline.
30
-
31
- A test can download a contract PDF and check that its "Total Amount" field is
32
- blank. It can also read a spreadsheet sheet as rows and check the totals.
33
-
34
- The package is not on PyPI yet. Install it from GitHub, as shown below.
35
-
36
- ## Contents
37
-
38
- - [Requirements](#requirements)
39
- - [Install](#install)
40
- - [Quick example](#quick-example)
41
- - [Keywords](#keywords)
42
- - [Offline and size limits](#offline-and-size-limits)
43
- - [Field lookup](#field-lookup)
44
- - [PDF form fields](#pdf-form-fields)
45
- - [Why use it](#why-use-it)
46
- - [Measurements](#measurements)
47
- - [Development](#development)
48
- - [License](#license)
49
-
50
- ## Requirements
51
-
52
- - Python 3.10 to 3.14.
53
- - Robot Framework 7.5.1 and MarkItDown 0.1.10. pip installs both.
54
-
55
- ## Install
56
-
57
- ```sh
58
- pip install git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0
59
- ```
60
-
61
- For AcroForm (fillable PDF) field values, install the `acroform` extra. It adds
62
- pypdf:
63
-
64
- ```sh
65
- pip install "robotframework-markitdown[acroform] @ git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0"
66
- ```
67
-
68
- Import the library in a suite:
69
-
70
- ```robotframework
71
- *** Settings ***
72
- Library MarkItDownLibrary
73
- ```
74
-
75
- ## Quick example
76
-
77
- ```robotframework
78
- *** Settings ***
79
- Library RequestsLibrary
80
- Library MarkItDownLibrary
81
-
82
- *** Test Cases ***
83
- New Contract Has No Total Amount
84
- ${resp}= GET On Session api /contracts/${id}/pdf
85
- ${md}= Convert Bytes To Markdown ${resp.content} .pdf
86
- Markdown Should Contain ${md} Onboarding Contract
87
- Field Should Be Blank ${md} Total Amount
88
-
89
- Invoice Sheet Totals
90
- ${rows}= Get Sheet As Table ${OUTPUT DIR}/invoice.xlsx Summary
91
- Should Be Equal ${rows}[0][Total] 0
92
- ```
93
-
94
- ## Keywords
95
-
96
- | Keyword | What it does |
97
- |---|---|
98
- | Convert File To Markdown | Converts a local file and returns the Markdown. |
99
- | Convert Bytes To Markdown | Converts bytes, such as a response body, using an extension as the format hint. |
100
- | Markdown Should Contain | Passes when the text is in the Markdown. Case and whitespace rules are options. |
101
- | Markdown Should Not Contain | Passes when the text is not in the Markdown. |
102
- | Markdown Should Match Regexp | Passes when a multiline regular expression matches. Returns the match. |
103
- | Get Tables From Markdown | Returns every pipe table as rows of cells. |
104
- | Get Table From Markdown | Returns one table as rows keyed by its header. |
105
- | Get Table Cell | Returns one cell by body row number and column name or number. |
106
- | Get Field Value | Returns the value of a labelled field. Returns an empty string when blank. |
107
- | Field Should Be | Passes when a labelled field has the expected value. |
108
- | Field Should Be Blank | Passes when a labelled field is found and empty. |
109
- | Pdf Field Should Be Blank | Checks a PDF form field, or the converted text when there is no form field. |
110
- | Get Sheet Names | Returns the sheet names of an XLSX file in workbook order. |
111
- | Get Sheet As Table | Returns one XLSX sheet as rows keyed by header. |
112
- | Set Converter Options | Sets the size cap and whether data URIs are kept. |
113
- | Set Pdf Limits | Sets the PDF character limits that MarkItDown enforces. |
114
-
115
- Full keyword docs:
116
- [MarkItDownLibrary.html](https://github.com/ai94iq/robotframework-markitdown/blob/main/docs/MarkItDownLibrary.html)
117
-
118
- ## Offline and size limits
119
-
120
- - Only local files and bytes are converted. A path that starts with `file:`,
121
- `http:`, `https:` or `data:` is refused.
122
- - Plugins, LLM and Azure features are off. Only the built-in converters run.
123
- - Each document is checked against a size cap before conversion. The default cap
124
- is 50 MB. `Set Converter Options` changes it.
125
- - Embedded data URIs are dropped from the output unless `keep_data_uris` is set.
126
- - A PDF over a character limit fails with a resource limit error. The defaults
127
- are 100,000 characters a page, 2,000,000 in total and 10,000,000 in the output.
128
- `Set Pdf Limits` changes them; a call with no arguments restores the defaults.
129
- - Images convert to text only when the `exiftool` program is installed and on
130
- `PATH` (or named in `EXIFTOOL_PATH`). Without it an image converts to an empty
131
- string. The library does not install ExifTool.
132
- - Unit tests block network calls while they convert files.
133
-
134
- ## Field lookup
135
-
136
- `Get Field Value`, `Field Should Be` and `Field Should Be Blank` find a label in
137
- this order:
138
-
139
- 1. A table row whose first cell is the label. The value is the second cell.
140
- 2. A line that starts with the label and the separator (`:` by default). The
141
- value is the text after the separator.
142
- 3. Only with `next_line=True`: a line that is the label alone. The value is the
143
- next non-empty line. If that line ends with the separator, or the label is
144
- the last line, the value is blank.
145
-
146
- When a label repeats, `occurrence` picks the nth match (from 1) in the same
147
- order of rules. An `occurrence` past the last match fails and names the count.
148
-
149
- A label that is not found fails the test and shows the closest lines. A label
150
- that is found with no value returns `""`.
151
-
152
- ## PDF form fields
153
-
154
- `Pdf Field Should Be Blank` first looks for an AcroForm field with that name,
155
- when pypdf is installed. If the field is there, its value is checked. Otherwise
156
- the check runs on the converted text, with the field lookup rules above. Without
157
- pypdf, the text check always runs.
158
-
159
- ## Why use it
160
-
161
- - One import gives a test the file reading and the checks: convert a PDF,
162
- DOCX, XLSX, PPTX or HTML file, then check text, tables and labelled fields.
163
- - `Pdf Field Should Be Blank` reads the AcroForm field value first. A plain
164
- text read of a filled form can miss that value (see the measurements).
165
- - `Get Sheet As Table` returns an XLSX sheet as rows keyed by header.
166
- - Failures show the closest lines, so a missing label is easy to find.
167
- - Local files and bytes only; no network, plugin, LLM or Azure call.
168
-
169
- ## Measurements
170
-
171
- Each number comes from a run on 2026-12-06 (Windows, Python 3.13, MarkItDown
172
- 0.1.10, pypdf 7.2.0). "Plain read" is pypdf `extract_text` over all pages.
173
- Median of 30 runs per fixture; 3 for the two IRS forms.
174
-
175
- | Check | Plain read | This library |
176
- |---|---|---|
177
- | Blank or filled, 4 fixtures in `atest/fixtures` | 3 of 4 | 4 of 4 |
178
- | `contract_form_filled.pdf` (field value 250) | reads blank | reads filled |
179
- | Conversion time, one-line fixtures | 0.52-0.53 ms | 2.11-2.20 ms |
180
- | Conversion time, IRS W-9 (6 pages) | 55 ms | 2861 ms (4327 ms before the extension shortcut) |
181
- | Conversion time, IRS W-4 (5 pages) | 148 ms | 6912 ms (7942 ms before) |
182
-
183
- What this supports: on a form whose value lives in a field, the plain read
184
- says blank and the library reads the value.
185
-
186
- What it does not show:
187
-
188
- - No size win. On the one-line fixtures the Markdown is 1 to 2 characters
189
- longer than the plain text.
190
- - No speed win. The library is about 4 times slower per small file and much
191
- slower on larger forms. Tokens and model calls were not measured, and the two forms have no
192
- known field values beyond the ones the test wrote.
193
- - Four fixtures and two public forms are a small sample.
194
-
195
- For `.pdf`, `.docx`, `.xlsx` and `.pptx` files the library trusts the file
196
- extension and skips MarkItDown's content sniffing. A file with a wrong
197
- extension for these formats is not re-identified. Other extensions are still
198
- sniffed. This relies on a private MarkItDown attribute, so it is re-checked on
199
- each MarkItDown upgrade.
200
-
201
- ## Development
202
-
203
- ```sh
204
- uv pip install -e .[acroform]
205
- python -m pytest
206
- robot atest
207
- pyright
208
- python -m robot.libdoc MarkItDownLibrary docs/MarkItDownLibrary.html
209
- ```
210
-
211
- - `pytest` runs the unit tests in `utest/`.
212
- - `robot atest` runs the acceptance suites in `atest/`.
213
- - `pyright` checks `src`, `utest` and `tools` in strict mode.
214
- - The last command rebuilds the keyword docs in `docs/`.
215
-
216
- ## License
217
-
218
- MIT.
@@ -1,194 +0,0 @@
1
- # robotframework-markitdown
2
-
3
- Robot Framework keywords that read PDF, DOCX, XLSX, PPTX and HTML files as
4
- Markdown, then check their text, tables and field values. Conversion uses
5
- Microsoft MarkItDown and runs offline.
6
-
7
- A test can download a contract PDF and check that its "Total Amount" field is
8
- blank. It can also read a spreadsheet sheet as rows and check the totals.
9
-
10
- The package is not on PyPI yet. Install it from GitHub, as shown below.
11
-
12
- ## Contents
13
-
14
- - [Requirements](#requirements)
15
- - [Install](#install)
16
- - [Quick example](#quick-example)
17
- - [Keywords](#keywords)
18
- - [Offline and size limits](#offline-and-size-limits)
19
- - [Field lookup](#field-lookup)
20
- - [PDF form fields](#pdf-form-fields)
21
- - [Why use it](#why-use-it)
22
- - [Measurements](#measurements)
23
- - [Development](#development)
24
- - [License](#license)
25
-
26
- ## Requirements
27
-
28
- - Python 3.10 to 3.14.
29
- - Robot Framework 7.5.1 and MarkItDown 0.1.10. pip installs both.
30
-
31
- ## Install
32
-
33
- ```sh
34
- pip install git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0
35
- ```
36
-
37
- For AcroForm (fillable PDF) field values, install the `acroform` extra. It adds
38
- pypdf:
39
-
40
- ```sh
41
- pip install "robotframework-markitdown[acroform] @ git+https://github.com/ai94iq/robotframework-markitdown@v0.2.0"
42
- ```
43
-
44
- Import the library in a suite:
45
-
46
- ```robotframework
47
- *** Settings ***
48
- Library MarkItDownLibrary
49
- ```
50
-
51
- ## Quick example
52
-
53
- ```robotframework
54
- *** Settings ***
55
- Library RequestsLibrary
56
- Library MarkItDownLibrary
57
-
58
- *** Test Cases ***
59
- New Contract Has No Total Amount
60
- ${resp}= GET On Session api /contracts/${id}/pdf
61
- ${md}= Convert Bytes To Markdown ${resp.content} .pdf
62
- Markdown Should Contain ${md} Onboarding Contract
63
- Field Should Be Blank ${md} Total Amount
64
-
65
- Invoice Sheet Totals
66
- ${rows}= Get Sheet As Table ${OUTPUT DIR}/invoice.xlsx Summary
67
- Should Be Equal ${rows}[0][Total] 0
68
- ```
69
-
70
- ## Keywords
71
-
72
- | Keyword | What it does |
73
- |---|---|
74
- | Convert File To Markdown | Converts a local file and returns the Markdown. |
75
- | Convert Bytes To Markdown | Converts bytes, such as a response body, using an extension as the format hint. |
76
- | Markdown Should Contain | Passes when the text is in the Markdown. Case and whitespace rules are options. |
77
- | Markdown Should Not Contain | Passes when the text is not in the Markdown. |
78
- | Markdown Should Match Regexp | Passes when a multiline regular expression matches. Returns the match. |
79
- | Get Tables From Markdown | Returns every pipe table as rows of cells. |
80
- | Get Table From Markdown | Returns one table as rows keyed by its header. |
81
- | Get Table Cell | Returns one cell by body row number and column name or number. |
82
- | Get Field Value | Returns the value of a labelled field. Returns an empty string when blank. |
83
- | Field Should Be | Passes when a labelled field has the expected value. |
84
- | Field Should Be Blank | Passes when a labelled field is found and empty. |
85
- | Pdf Field Should Be Blank | Checks a PDF form field, or the converted text when there is no form field. |
86
- | Get Sheet Names | Returns the sheet names of an XLSX file in workbook order. |
87
- | Get Sheet As Table | Returns one XLSX sheet as rows keyed by header. |
88
- | Set Converter Options | Sets the size cap and whether data URIs are kept. |
89
- | Set Pdf Limits | Sets the PDF character limits that MarkItDown enforces. |
90
-
91
- Full keyword docs:
92
- [MarkItDownLibrary.html](https://github.com/ai94iq/robotframework-markitdown/blob/main/docs/MarkItDownLibrary.html)
93
-
94
- ## Offline and size limits
95
-
96
- - Only local files and bytes are converted. A path that starts with `file:`,
97
- `http:`, `https:` or `data:` is refused.
98
- - Plugins, LLM and Azure features are off. Only the built-in converters run.
99
- - Each document is checked against a size cap before conversion. The default cap
100
- is 50 MB. `Set Converter Options` changes it.
101
- - Embedded data URIs are dropped from the output unless `keep_data_uris` is set.
102
- - A PDF over a character limit fails with a resource limit error. The defaults
103
- are 100,000 characters a page, 2,000,000 in total and 10,000,000 in the output.
104
- `Set Pdf Limits` changes them; a call with no arguments restores the defaults.
105
- - Images convert to text only when the `exiftool` program is installed and on
106
- `PATH` (or named in `EXIFTOOL_PATH`). Without it an image converts to an empty
107
- string. The library does not install ExifTool.
108
- - Unit tests block network calls while they convert files.
109
-
110
- ## Field lookup
111
-
112
- `Get Field Value`, `Field Should Be` and `Field Should Be Blank` find a label in
113
- this order:
114
-
115
- 1. A table row whose first cell is the label. The value is the second cell.
116
- 2. A line that starts with the label and the separator (`:` by default). The
117
- value is the text after the separator.
118
- 3. Only with `next_line=True`: a line that is the label alone. The value is the
119
- next non-empty line. If that line ends with the separator, or the label is
120
- the last line, the value is blank.
121
-
122
- When a label repeats, `occurrence` picks the nth match (from 1) in the same
123
- order of rules. An `occurrence` past the last match fails and names the count.
124
-
125
- A label that is not found fails the test and shows the closest lines. A label
126
- that is found with no value returns `""`.
127
-
128
- ## PDF form fields
129
-
130
- `Pdf Field Should Be Blank` first looks for an AcroForm field with that name,
131
- when pypdf is installed. If the field is there, its value is checked. Otherwise
132
- the check runs on the converted text, with the field lookup rules above. Without
133
- pypdf, the text check always runs.
134
-
135
- ## Why use it
136
-
137
- - One import gives a test the file reading and the checks: convert a PDF,
138
- DOCX, XLSX, PPTX or HTML file, then check text, tables and labelled fields.
139
- - `Pdf Field Should Be Blank` reads the AcroForm field value first. A plain
140
- text read of a filled form can miss that value (see the measurements).
141
- - `Get Sheet As Table` returns an XLSX sheet as rows keyed by header.
142
- - Failures show the closest lines, so a missing label is easy to find.
143
- - Local files and bytes only; no network, plugin, LLM or Azure call.
144
-
145
- ## Measurements
146
-
147
- Each number comes from a run on 2026-12-06 (Windows, Python 3.13, MarkItDown
148
- 0.1.10, pypdf 7.2.0). "Plain read" is pypdf `extract_text` over all pages.
149
- Median of 30 runs per fixture; 3 for the two IRS forms.
150
-
151
- | Check | Plain read | This library |
152
- |---|---|---|
153
- | Blank or filled, 4 fixtures in `atest/fixtures` | 3 of 4 | 4 of 4 |
154
- | `contract_form_filled.pdf` (field value 250) | reads blank | reads filled |
155
- | Conversion time, one-line fixtures | 0.52-0.53 ms | 2.11-2.20 ms |
156
- | Conversion time, IRS W-9 (6 pages) | 55 ms | 2861 ms (4327 ms before the extension shortcut) |
157
- | Conversion time, IRS W-4 (5 pages) | 148 ms | 6912 ms (7942 ms before) |
158
-
159
- What this supports: on a form whose value lives in a field, the plain read
160
- says blank and the library reads the value.
161
-
162
- What it does not show:
163
-
164
- - No size win. On the one-line fixtures the Markdown is 1 to 2 characters
165
- longer than the plain text.
166
- - No speed win. The library is about 4 times slower per small file and much
167
- slower on larger forms. Tokens and model calls were not measured, and the two forms have no
168
- known field values beyond the ones the test wrote.
169
- - Four fixtures and two public forms are a small sample.
170
-
171
- For `.pdf`, `.docx`, `.xlsx` and `.pptx` files the library trusts the file
172
- extension and skips MarkItDown's content sniffing. A file with a wrong
173
- extension for these formats is not re-identified. Other extensions are still
174
- sniffed. This relies on a private MarkItDown attribute, so it is re-checked on
175
- each MarkItDown upgrade.
176
-
177
- ## Development
178
-
179
- ```sh
180
- uv pip install -e .[acroform]
181
- python -m pytest
182
- robot atest
183
- pyright
184
- python -m robot.libdoc MarkItDownLibrary docs/MarkItDownLibrary.html
185
- ```
186
-
187
- - `pytest` runs the unit tests in `utest/`.
188
- - `robot atest` runs the acceptance suites in `atest/`.
189
- - `pyright` checks `src`, `utest` and `tools` in strict mode.
190
- - The last command rebuilds the keyword docs in `docs/`.
191
-
192
- ## License
193
-
194
- MIT.
@@ -1 +0,0 @@
1
- __version__ = "0.2.1"