Manual push Fri Jun 9 12:16:37 AM CEST 2023

This commit is contained in:
2023-06-09 00:16:37 +02:00
parent d1e396e1ac
commit 5a5714ff49
19 changed files with 72 additions and 47 deletions

View File

@@ -2,7 +2,7 @@
. ./Src.*.sh || true
# Update time of last edit
sh ./OcttKB.EmptyDate.sh || true
sh ./EmptySetDate.sh || true
# Ensure important directories
rm -rf ./Output.tmp || true

View File

@@ -3,5 +3,5 @@ creator: Octt
modified: 20230417120312165
modifier: Octt
tags:
title: $:/OcttKB/Repo/GitHub.Main.sh
type: text/plain
title: $:/OcttKB/Repo/Deploy.Main.sh
type: text/plain

View File

@@ -10,9 +10,9 @@ tiddlywiki \
--rendertiddler $:/core/templates/alltiddlers.template.html Static.html text/plain
# Apply patches to the static HTML
python3 ../PatchStatic.py
python3 ../PatchStatic.py ./Static.html
# Deploy copies of immediately previous versions
Url="https://kb.octt.eu.org"
wget -O ./-1.html "$Url" || true
wget -O ./-1.html "$Url" || true
wget -O ./-2.html "$Url/-1.html" || true

View File

@@ -0,0 +1,6 @@
#!/bin/sh
cat << EOF > ./Wiki-OcttKB/tiddlers/System/\$__OcttKB_Empty.tid
created: 19700101000000000
modified: $(date +%Y%m%d%H%M%S000)
title: \$:/OcttKB/Empty
EOF

View File

@@ -0,0 +1,6 @@
created: 20230414104412035
creator: Octt
modified: 20230414104554549
modifier: Octt
title: $:/OcttKB/Repo/EmptySetDate.sh
type: text/plain

View File

@@ -1,3 +1,4 @@
#!/bin/sh
. ./Src.*.sh || true
sh ./BuildSPA.sh
sh ./DeployAll.sh

View File

@@ -1,12 +1,35 @@
#!/usr/bin/env python3
from base64 import b64encode
from bs4 import BeautifulSoup
from re import sub
from sys import argv
File = 'Static.html'
File = argv[-1]
B64Prefix = 'data:text/html;base64,'
def b64encodeStr(Data):
return b64encode(Data.encode()).decode()
def MkHtml(Content:str):
return f'''\
<!DOCTYPE html>
<html>
<body>{Content}</body>
</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'));
def SafeIframe(m):
SrcData = m.group(2)
SrcData = b64encodeStr(MkHtml(f'<a href="{SrcData}">Click to load: {SrcData}</a>'))
return f'<iframe {m.group(1)} src="{B64Prefix}{SrcData}"></iframe>'
open(File, 'w').write(sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Source));
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)
Html = sub('<iframe (.+) src="(.+)"><\/iframe>', SafeIframe, Html)
open(File, 'w').write(Html)

View File

@@ -18,9 +18,9 @@ TryCrossRepoSync(){
CommitMsg0="$("OcttKB Cross-Repo Sync" | ToLower)"
[ "$CommitCheck" != "$CommitMsg0 (html to raw)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (raw to html)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (htm to raw)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (raw to htm)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (web to raw)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (raw to web)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (htm to raw)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (raw to htm)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (web to raw)" ] && \
[ "$CommitCheck" != "$CommitMsg0 (raw to web)" ] && \
sh ./GitLab.CrossRepoSync.sh || true
}

View File

@@ -1,5 +1,3 @@
#!/bin/sh
ToLower(){
echo "$1" | tr "[:upper:]" "[:lower:]"
}
ToLower(){ echo "$1" | tr "[:upper:]" "[:lower:]"; }

View File

@@ -54,7 +54,9 @@ title: $:/Styles/Breadcrumbs
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > summary,
.View-Breadcrumbs details > summary {
width: fit-content;
list-style: none;
cursor: pointer;
}
tc-table-of-contents