chore: update something
Browse files- docsifer/service.py +3 -3
docsifer/service.py
CHANGED
@@ -184,14 +184,14 @@ class DocsiferService:
|
|
184 |
# )
|
185 |
|
186 |
try:
|
187 |
-
result_obj = md_converter.convert(source)
|
188 |
print("result_obj:\n", result_obj.text_content)
|
189 |
except Exception as e:
|
190 |
logger.error("MarkItDown conversion failed: %s", e)
|
191 |
raise RuntimeError(f"Conversion failed for '{source}': {e}")
|
192 |
|
193 |
-
if isinstance(source, Path) and source.exists():
|
194 |
-
|
195 |
|
196 |
# Count tokens in the resulting markdown text.
|
197 |
token_count = self._count_tokens(result_obj.text_content)
|
|
|
184 |
# )
|
185 |
|
186 |
try:
|
187 |
+
result_obj = md_converter.convert(source=str(source))
|
188 |
print("result_obj:\n", result_obj.text_content)
|
189 |
except Exception as e:
|
190 |
logger.error("MarkItDown conversion failed: %s", e)
|
191 |
raise RuntimeError(f"Conversion failed for '{source}': {e}")
|
192 |
|
193 |
+
# if isinstance(source, Path) and source.exists():
|
194 |
+
# source.unlink()
|
195 |
|
196 |
# Count tokens in the resulting markdown text.
|
197 |
token_count = self._count_tokens(result_obj.text_content)
|