from typing import Mapping


def _extract_actions(args: Mapping[str, bool]) -> list[str]:
    """Return specified actions if any or all avialable actions if script called without args."""

    all_actions = [action for action in args.keys()]
    selected_actions = [action for action, selected in args.items() if selected]
    return selected_actions or all_actions