OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
2023-03-24 11:58:33 +00:00
parent e0528394e6
commit dc21b3c71c
1537 changed files with 93 additions and 1028 deletions

View File

@@ -0,0 +1,12 @@
#!/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));