OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
2023-09-30 00:18:46 +00:00
parent 41fec08841
commit bb5fe8b378
7 changed files with 13 additions and 11 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
from base64 import b64encode
from bs4 import BeautifulSoup
from re import sub, DOTALL
from re import sub
from sys import argv
File = argv[-1]
@ -29,7 +29,7 @@ def SafeIframe(m):
Html = str(BeautifulSoup(open(File, 'r'), 'html5lib'))
Html = sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Html)
Html = sub('<iframe( +)src="(.+)"><\/iframe>', SafeIframe, Html, flags=DOTALL)
Html = sub('<iframe (.+) src="(.+)"><\/iframe>', SafeIframe, Html, flags=DOTALL)
Html = sub('<iframe( +)src="[\S\n\t\v ]+?"><\/iframe>', SafeIframe, Html)
Html = sub('<iframe (.+) src="[\S\n\t\v ]+?"><\/iframe>', SafeIframe, Html)
open(File, 'w').write(Html)

View File

@ -1,6 +1,6 @@
created: 20230307221237990
creator: Octt
modified: 20230929110856571
modified: 20230929145246611
modifier: Octt
title: $:/OcttKB/Repo/PatchStatic.py
type: text/plain

View File

@ -1,5 +1,5 @@
created: 20230929115455289
created: 20230930001840040
current-tiddler: GettingStarted
modified: 20230929115455289
modified: 20230930001840040
title: $:/HistoryList
type: application/json

View File

@ -1,6 +1,6 @@
created: 20230929094559840
creator: Octt
list:
modified: 20230929114115280
modified: 20230930001648015
modifier: Octt
title: $:/StoryList

View File

@ -1,6 +1,6 @@
created: 20220920092307479
creator: Octt
modified: 20230929111714424
modified: 20230929145609533
modifier: Octt
title: $:/state/tab/sidebar--595412856