From f2fc240e28839820f3786fa44d1877953177ecd8 Mon Sep 17 00:00:00 2001 From: rong-xyz <167156592+rong-xyz@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:32:02 +0800 Subject: [PATCH] Update README.md --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 91cf924..53bcb2b 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,22 @@ pip install git+https://github.com/pathintegral-institute/markitup.git@main#subd ```bash uv add git+https://github.com/pathintegral-institute/markitup.git@main#subdirectory=packages/markitup -``` \ No newline at end of file +``` + +## Usage +```python +from markitup.converter_utils.utils import read_files_to_bytestreams +from markitup import MarkItUp, Config + +fs = read_files_to_bytestreams('packages/markitup/tests/test_files') + +miu = MarkItUp( + config=Config( + modalities=['image', 'audio'], + image_use_webp=True + ) + ) + +result, stream_info = miu.convert(stream=fs[file_name], file_name=file_name) + +```