def add_filter_flags(category, text):
    """
    Add flag columns for easier filtering downstream.
    """    
    # Specify if a line is internal to Renpy.
    is_renpy = category.startswith('renpy_')
    
    # Specify which lines indicate a crossroads.
    is_choice = category.startswith('choice_')

    # Specify when it's actual text to be read.
    is_read = category.startswith('dialogue_')
    
    # Specify when a character actually speaks the line.
    has_speaker = is_read and category not in ('dialogue_unspecified', 'dialogue_internal')
    
    # Optional (branching) content is tab-indented.
        # Note: This is custom to Adastra, not all RenPy games!
        # * conditional   = 0 space indent; branch content = 4 space indent
        # * player_choice = 4 space indent; branch content = 8 space indent
    is_branch = text.startswith(' ' * 4) and not is_choice
    
    return (is_renpy, is_choice, is_read, has_speaker, is_branch)