mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-06-06 00:29:12 +02:00
OcttKB Cross-Repo Sync (HTML to Raw)
This commit is contained in:
@@ -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));
|
Reference in New Issue
Block a user