Skip to content

Commit 172e536

Browse files
committed
Final QA
1 parent eca46a0 commit 172e536

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

python-markitdown/batch_converter.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ def main(
1414

1515
md = MarkItDown()
1616

17-
for file_path in input_path.glob("*"):
17+
for file_path in input_path.rglob("*"):
1818
if file_path.suffix in target_formats:
1919
try:
2020
result = md.convert(file_path)
2121
except Exception as e:
2222
print(f"✗ Error converting {file_path.name}: {e}")
2323
continue
2424

25-
output_file = (
26-
output_path / f"{file_path.stem}{file_path.suffix}.md"
27-
)
25+
output_file = output_path / f"{file_path.stem}{file_path.suffix}.md"
2826
output_file.write_text(result.markdown, encoding="utf-8")
2927
print(f"✓ Converted {file_path.name}{output_file.name}")
3028

python-markitdown/convert_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from markitdown import MarkItDown
22

33
md = MarkItDown()
4-
result = md.convert("./data/sample_DOCX.docx")
5-
print(result)
4+
result = md.convert("./data/markdown_syntax.docx")
5+
print(result.markdown)

python-markitdown/img_description.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
from openai import OpenAI
33

44
client = OpenAI()
5-
md = MarkItDown(
6-
llm_client=client,
7-
llm_model="gpt-4o",
8-
)
5+
md = MarkItDown(llm_client=client, llm_model="gpt-4o")
96

107
result = md.convert("./data/real-python.png")
118
print(result.markdown)

0 commit comments

Comments
 (0)