[Share] Convert Annotated Text to Markdown #389
TideDra
started this conversation in
Action Scripts
Replies: 2 comments 2 replies
-
The best practice is to use this script together with the note template windingwind/zotero-better-notes#1139 , which generates note from annotations and render the markdown annotations correctly. |
Beta Was this translation helpful? Give feedback.
0 replies
-
我来评论,这个action就是配置老是有问题,一直无法正常运行脚本 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
This script converts annotated text (highlight, underlined) which may contain math expressions to markdown via Multimodal LLM. The script needs to run external python file to process image and query the MLLM.
Before:

After:

This script is similar to #220 , but is more powerful. #220 can only convert image annotation in a note editor, while this script directly converts text annotation and replace it. Moreover, MLLM is much more accurate, flexible and cheap than traditional Math OCR tools, which can also recognize a mixture of plain text and math expressions.
Event
Creat Annotation
Operation
Script
Data
Anything else
The python file
IMG2MD.py
is:Please replace the endpoint, api_key and model to your owns that supports OpenAI request format. But note that the prompt is designed for Qwen-VL-max.
And make sure the required python packages are installed.
Each request takes 5~10 seconds, depending on the length of text.
Beta Was this translation helpful? Give feedback.
All reactions