import os
import re

os.chdir('/Users/matt/dev/OTSSignsTheme/manual/en')

files = [
    'layouts_editor.html', 'layouts_editor_design_changes.html',
    'layouts_editor_editing_tools.html', 'layouts_editor_global_elements.html',
    'layouts_editor_library_search.html', 'layouts_editor_using_templates.html',
    'layouts_interactive_actions.html', 'scheduling_repeats.html',
    'scheduling_layout_list.html', 'scheduling_priority_display_order.html',
    'users_administration.html', 'users_groups.html',
    'configure_folders.html', 'configure_tags.html',
    'getting_started_showing_a_playlist.html', 'getting_started_showing_a_playlist_v4.html',
    'getting_started_showing_a_video.html', 'getting_started_showing_a_video_v4.html',
    'getting_started_showing_an_image.html', 'getting_started_showing_an_image_v4.html',
]

for fn in files:
    with open(fn) as f:
        content = f.read()
    idx = content.find('further_reading')
    if idx == -1:
        continue
    fr_block = content[idx:idx+600]
    print(f'=== {fn} ===')
    print(fr_block[:400])
    print()
