Skip to content

Python tool for converting files and office documents to Markdown.

Remove _is_chart

sakasegawa0dd4e95584dc
diff --git a/src/markitdown/_markitdown.py b/src/markitdown/_markitdown.py
index 17c9dab4..63f7c9dc 100644
--- a/src/markitdown/_markitdown.py
+++ b/src/markitdown/_markitdown.py
@@ -586,7 +586,6 @@ class PptxConverter(HtmlConverter):
if shape.has_chart:
md_content += self._convert_chart_to_markdown(shape.chart)
-
# Text areas
elif shape.has_text_frame:
if shape == title:
@@ -621,11 +620,6 @@ class PptxConverter(HtmlConverter):
return True
return False
- def _is_chart(self, shape):
- if shape.shape_type == pptx.enum.shapes.MSO_SHAPE_TYPE.CHART:
- return True
- return False
-
def _convert_chart_to_markdown(self, chart):
md = "\n\n### Chart"
if chart.has_title:
@@ -649,6 +643,7 @@ class PptxConverter(HtmlConverter):
separator = "|" + "|".join(["---"] * len(data[0])) + "|"
return md + "\n".join([header, separator] + markdown_table[1:])
+
class MediaConverter(DocumentConverter):
"""
Abstract class for multi-modal media (e.g., images and audio)
diff --git a/tests/test_markitdown.py b/tests/test_markitdown.py
index ee083004..4922c493 100644
--- a/tests/test_markitdown.py
+++ b/tests/test_markitdown.py
@@ -57,8 +57,8 @@ PPTX_TEST_STRINGS = [
"44bf7d06-5e7a-4a40-a2e1-a2e42ef28c8a",
"1b92870d-e3b5-4e65-8153-919f4ff45592",
"AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation",
- "a3f6004b-6f4f-4ea8-bee3-3741f4dc385f", # chart title
- "2003", # chart value
+ "a3f6004b-6f4f-4ea8-bee3-3741f4dc385f", # chart title
+ "2003", # chart value
]
BLOG_TEST_URL = "https://microsoft.github.io/autogen/blog/2023/04/21/LLM-tuning-math"