def read_api_rst(filename):
    """Yield modules documented in the given file."""
    with open(filename, 'r') as infile:
        for lines in infile:
            if lines.find('automodule') != -1:
                yield lines.strip().split()[-1]
