omnipy.components.raw.tasks
Tasks for decoding, editing, concatenating, and unioning raw datasets.
| FUNCTION | DESCRIPTION |
|---|---|
decode_bytes |
Decode each binary data file to text, auto-detecting encoding when none is supplied. |
modify_all_lines |
Apply a callable to stripped lines and join the result with OS-specific newlines. |
modify_datafile_content |
Apply a callable to each full text data file. |
modify_each_line |
Apply a callable to each line and rebuild the text from returned lines. |
| ATTRIBUTE | DESCRIPTION |
|---|---|
UNION_DESC_COMMON |
|
UNION_DESC_COMMON
module-attribute
UNION_DESC_COMMON = dedent(
" Union is based on a deep copy of the first {obj}, with consecutive\n unions through the `|=` operator."
)
decode_bytes
decode_bytes(data: Model[bytes], encoding: str | None = None) -> str
Decode each binary data file to text, auto-detecting encoding when none is supplied.
Source code in src/omnipy/components/raw/tasks.py
modify_all_lines
modify_all_lines(
data_file: Model[str], modify_all_lines_func: IsModifyAllLinesCallable, **kwargs: object
) -> str
Apply a callable to stripped lines and join the result with OS-specific newlines.
Source code in src/omnipy/components/raw/tasks.py
modify_datafile_content
modify_datafile_content(
data_file: Model[str], modify_content_func: IsModifyContentCallable, **kwargs: object
) -> str
Apply a callable to each full text data file.
Source code in src/omnipy/components/raw/tasks.py
modify_each_line
modify_each_line(
data_file: Model[str], modify_line_func: IsModifyEachLineCallable, **kwargs: object
) -> str
Apply a callable to each line and rebuild the text from returned lines.