Skip to content

Instantly share code, notes, and snippets.

View LeeiFrankJaw's full-sized avatar

Lei Zhao LeeiFrankJaw

View GitHub Profile
@LeeiFrankJaw
LeeiFrankJaw / hocr2djvused.py
Last active June 19, 2023 03:06 — forked from char101/hocr2djvused.py
Converter from tesseract hocr to djvused commands (python 3, tested with tesseract 5.0.0 alpha)
import os
import re
import sys
from io import StringIO
from lxml import etree
SPECIAL_CHARACTERS = {
7: 'a', # BELL
8: 'b', # BS