mirror of
https://github.com/simon987/sist2.git
synced 2025-04-16 08:56:45 +00:00
15 lines
255 B
Python
15 lines
255 B
Python
import subprocess
|
|
|
|
|
|
def get_tesseract_langs():
|
|
|
|
res = subprocess.check_output([
|
|
"tesseract",
|
|
"--list-langs"
|
|
]).decode()
|
|
|
|
languages = res.split("\n")[1:]
|
|
|
|
return list(filter(lambda lang: lang and lang != "osd", languages))
|
|
|