import re import sys def main(): try: with open('src/main/resources/templates/index.html', 'r', encoding='utf-8') as f: content = f.read() # Find the start of content-top content_top_start = content.find('
') if content_top_start == -1: print("Could not find content-top") sys.exit(1) # Find the end of content-top (heuristic: before
for the next block) # Actually, let's just find the next block, which starts with
# In index.html, content-top is lines 128 to 337 next_block_start = content.find('