microsoft / microsoft/markitdown

[Feature] Add HTML content string support to converter

Open
#1,230 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

Currently, MarkItDown.convert's source argument only accepts path (Path | str), url or requests.response object.

I'm building a cross-platform app, and due to file system access restrictions imposed by Android (v10+), I don't have access to file paths that point to files outside of my app's internal directory tree — it's sandboxed. But I can use native APIs to read the contents of the file as a string and pass it to MarkItDown.convert.

It would be excellent if either MarkItDown.convert's source argument accepted HTML content as a string, or we had a separate method, such as converts — for "convert string" — just for that.

Similar to how we have json.load(), that takes a path to a json file, and json.loads(), that takes json content as a string.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the MarkItDown.convert entry point and trace how its source argument is dispatched. Confirm the chosen API accepts HTML content supplied as a string without requiring a filesystem path, and verify that it produces the expected Markdown using the relevant existing conversion checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.