utils

Provides utility functions.

Functions

simple_automation.utils.align_ellipsis(s, width)

Shrinks the given string to width (including an ellipsis character), and additionally pads the string with spaces to match the given with.

simple_automation.utils.choice_yes(msg: str)bool

Awaits user choice (Y/n).

simple_automation.utils.ellipsis(s, width)

Shrinks the given string to width (including an ellipsis character).

simple_automation.utils.merge_dicts(source, destination)

Recursively merges two dictionaries source and destination. The source dictionary will only be read, but the destination dictionary will be overwritten.

simple_automation.utils.print_transaction(context, transaction)

Prints the transaction summary

simple_automation.utils.print_transaction_early(transaction)

Prints the transaction summary early (i.e. without changes)

simple_automation.utils.print_transaction_title(transaction, title_color, status_char)

Prints the transaction title and name