Spaces:
Paused
Paused
File size: 403 Bytes
ece3e8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | with open('main.py', 'r', encoding='utf-8') as f:
lines = f.readlines()
start_idx = 2635
end_idx = 3266
html_lines = lines[start_idx:end_idx]
html_lines[0] = html_lines[0].replace(' return f\"\"\"', '')
html_lines[-1] = html_lines[-1].replace('\"\"\"\n', '\n')
with open('templates/dashboard.html', 'w', encoding='utf-8') as f:
f.writelines(html_lines)
print('Extracted dashboard.html')
|