-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manual push Fri Jun 9 12:16:37 AM CEST 2023
- Loading branch information
octospacc
committed
Jun 8, 2023
1 parent
d1e396e
commit 5a5714f
Showing
19 changed files
with
72 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
OcttKB.EmptyDate.sh → ...System/$__OcttKB_Repo_EmptySetDate.sh.txt
100755 → 100644
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_EmptySetDate.sh.txt.meta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
created: 20230414104412035 | ||
creator: Octt | ||
modified: 20230414104554549 | ||
modifier: Octt | ||
title: $:/OcttKB/Repo/EmptySetDate.sh | ||
type: text/plain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/sh | ||
. ./Src.*.sh || true | ||
sh ./BuildSPA.sh | ||
sh ./DeployAll.sh |
29 changes: 26 additions & 3 deletions
29
Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_PatchStatic.py.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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>' | ||
|
||
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(sub('<details><a name="(.+)"><summary>(.+)<\/summary>\s*<\/a>', Fix1, Source)); | ||
open(File, 'w').write(Html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/sh | ||
|
||
ToLower(){ | ||
echo "$1" | tr "[:upper:]" "[:lower:]" | ||
} | ||
ToLower(){ echo "$1" | tr "[:upper:]" "[:lower:]"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ | |
"tiddlywiki/starlight", | ||
"tiddlywiki/vanilla" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
#!/bin/sh | ||
set -e # Exit on any error | ||
cd "$( dirname "$( realpath "$0" )" )" | ||
|
||
pull() { | ||
pull(){ | ||
git pull | ||
} | ||
|
||
push() { | ||
push(){ | ||
git add . | ||
git commit -m "Manual push $(date)" | ||
git push | ||
} | ||
|
||
$1 | ||
deploy(){ | ||
Path="$1" | ||
[ -n "$Path" ] || Path="/tmp/OcttKB-Deploy" | ||
echo "Local Deploy to: $Path" | ||
sleep 5 | ||
rm -rf "$Path" | ||
cp -r . "$Path" | ||
cd "$Path" | ||
bash ./Bootstrap.sh | ||
bash ./Deploy.Main.sh | ||
} | ||
|
||
$@ |