Handling characters with height 6¶
Conversion utilities for height-6 ASCII art characters.
- advent_of_code_ocr.height_6.convert_6(input_text: str, *, fill_pixel: str = '#', empty_pixel: str = '.') str[source]¶
Convert height 6 text to characters.
- Parameters:
input_text – A string containing the ASCII art representation of characters.
fill_pixel – The character used to represent filled pixels (default is ‘#’).
empty_pixel – The character used to represent empty pixels (default is ‘.’).
- Returns:
A string containing the decoded characters.
- advent_of_code_ocr.height_6.convert_array_6(array: Sequence[Sequence[T]], *, fill_pixel: T = '#', empty_pixel: T = '.') str[source]¶
Convert a height 6 nested list to characters.
This function also accepts NumPy arrays or similar structures that can be converted to a list of lists
- Parameters:
array – A nested list (or similar structure) representing the ASCII art.
fill_pixel – The character used to represent filled pixels (default is ‘#’).
empty_pixel – The character used to represent empty pixels (default is ‘.’).
- Returns:
A string containing the decoded characters.