without implement any screenshot method, just get pics from clipboard, you can use any software to save screenshot to clipboard then do ocr get a simpletex api
put the config.json at same folder of executable, set the appid and appsecret
{
"url": "https://server.simpletex.cn/api/latex_ocr_turbo",
"appid": "xxxxxxxxxxxxxxxx",
"appsecret": "xxxxxxxxxxxxxxx",
"copywhich": 1
}
copywhich controls which latex you want copy when you press shortcut of copy ,
1 -> latex
2 -> $latex$
3 -> $$latex$$
use control + v
to paste picture from clipboard and then ocr
use control + c
to copy the latex
if some font error , make sure you installed the font conslas
use conda enviroment config enviroment.yml
to create a conda vritual enviroment
conda env create -f environment.yml
if qrimg is not exist , convert img to qrc resource before packaging by command
pyrcc5 qrimg.qrc -o qrimg.py
generate executable file
pyinstaller --onefile --windowed --icon=./img/Simpletex.ico Slatexocr.py