ocrd_utils.os module

Operating system functions.

ocrd_utils.os.abspath(url)[source]

Get a full path to a file or file URL

See os.abspath

ocrd_utils.os.pushd_popd(newcwd=None, tempdir=False)[source]
ocrd_utils.os.unzip_file_to_dir(path_to_zip, output_directory)[source]

Extract a ZIP archive to a directory

ocrd_utils.os.list_resource_candidates(executable, fname, cwd='/home/kba/monorepo/ocrd-website/repo/core/docs', is_file=False, is_dir=False)[source]

Generate candidates for processor resources according to https://ocr-d.de/en/spec/ocrd_tool#file-parameters (except python-bundled)

ocrd_utils.os.atomic_write(fpath)[source]