mirror of
https://github.com/sist2app/sist2.git
synced 2025-05-15 13:54:50 +02:00
14 lines
255 B
Python
14 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))
|
|
|