Modules

dcc_jp2_converter

This module contains all the logic for managing and executing the task of converting jp2 tiff files into jp2 images for the digital library.

command_runner

Used for running and logging commands.

class dcc_jp2_converter.modules.command_runner.CommandRunner

Used for executing commands.

get_output() → typing.Tuple[str, str]

Get the information written to standard out and standard error.

Returns:standard out, standard error
Return type:Tuple
run(command: list)

Execute command.

Parameters:command – Command with arguments in a list format

file_manager

dcc_jp2_converter.modules.file_manager.find_access_folders(path) → typing.Iterator[str]

Search a given path recursively for access folders.

Parameters:path – starting directory to search folders
Yields:Paths to directories with the name “access”
dcc_jp2_converter.modules.file_manager.find_converted_pair(folder: str) → typing.Iterator[dcc_jp2_converter.modules.file_manager.CollectionPair]

Search recursively from a path to find matching pairs of jp2 and tiff files with the same basename in the same folder.

Parameters:folder – root directory to search from.

Yields: Matches, if any.

dcc_jp2_converter.modules.file_manager.get_tiffs(path) → typing.Iterator[str]

Search for tiff files in a given folder

Parameters:path – Directory to search for tiff files
Yields:Full path to a tiff file