ocrd_cis/aio/aio.py
def find_page_xml_file(bdir, img):
    """search for a matching xml file in bdir"""
    for root, _, files in os.walk(bdir):
        if "alto" in root:
            continue
        if "page" not in root:
            continue
        for file in files:
            if file[-4:] != '.xml':
                continue
            if img in file:
                return os.path.join(bdir, root, file)
    return None
search for a matching xml file in bdir
search for a matching xml file in bdir
search for a matching xml file in bdir
def find_page_xml_file(bdir, img):
    for root, _, files in os.walk(bdir):
        if "alto" in root:
            continue
        if "page" not in root:
            continue
        for file in files:
            if file[-4:] != '.xml':
                continue
            if img in file:
                return os.path.join(bdir, root, file)
    return None
def find_page_xml_file ( bdir , img ) : for root , _ , files in os . walk ( bdir ) : if "alto" in root : continue if "page" not in root : continue for file in files : if file [ - 4 : ] != '.xml' : continue if img in file : return os . path . join ( bdir , root , file ) return None
search for a matching xml file in bdir
search for a matching xml file in bdir
"""search for a matching xml file in bdir"""
bdir
img