mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-01-24 03:31:05 +01:00
13 lines
350 B
Python
13 lines
350 B
Python
#!/usr/bin/env python3
|
|
from bs4 import BeautifulSoup
|
|
from re import sub
|
|
|
|
File = 'Static.html'
|
|
|
|
def Fix1(m):
|
|
return f'<details><a name="{m.group(1)}"></a><summary>{m.group(2)}</summary>'
|
|
|
|
Source = str(BeautifulSoup(open(File, 'r'), 'html5lib'));
|
|
|
|
open(File, 'w').write(sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Source));
|