From b25cc0a6596f488a5263dbab826f9d97e975b91f Mon Sep 17 00:00:00 2001 From: octospacc Date: Wed, 20 Dec 2023 20:08:01 +0000 Subject: [PATCH] OcttKB Cross-Repo Sync (HTML to Raw) --- .../tiddlers/Normal/Saved/Sites/_Sysadmin.tid | 10 ++++ Wiki-OcttKB/tiddlers/Normal/Saved/_Sites.tid | 3 +- Wiki-OcttKB/tiddlers/Normal/_Data storage.tid | 3 +- Wiki-OcttKB/tiddlers/Normal/_Nginx.tid | 3 +- .../OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt | 53 ++----------------- .../Repo/_GitLab.CrossRepoSync.sh.txt.meta | 2 +- .../OcttKB/Repo/_WikiFileToFolder.sh.txt | 48 +++++++++++++++++ .../OcttKB/Repo/_WikiFileToFolder.sh.txt.meta | 6 +++ .../tiddlers/System/_HistoryList.json.meta | 4 +- Wiki-OcttKB/tiddlers/System/_StoryList.tid | 4 +- .../System/state/_showeditpreview.tid | 4 +- .../System/state/tab/_sidebar--595412856.tid | 2 +- .../tiddlers/System/state/tree/$/Macros/_.tid | 4 +- .../System/state/tree/$/OcttKB/Repo/_.tid | 2 +- .../tiddlers/System/state/tree/$/OcttKB/_.tid | 2 +- .../tiddlers/System/state/tree/$/Styles/_.tid | 4 +- 16 files changed, 88 insertions(+), 66 deletions(-) create mode 100644 Wiki-OcttKB/tiddlers/Normal/Saved/Sites/_Sysadmin.tid create mode 100644 Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt create mode 100644 Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt.meta diff --git a/Wiki-OcttKB/tiddlers/Normal/Saved/Sites/_Sysadmin.tid b/Wiki-OcttKB/tiddlers/Normal/Saved/Sites/_Sysadmin.tid new file mode 100644 index 0000000..74431c4 --- /dev/null +++ b/Wiki-OcttKB/tiddlers/Normal/Saved/Sites/_Sysadmin.tid @@ -0,0 +1,10 @@ +created: 20231220192251148 +creator: Octt +modified: 20231220192612107 +modifier: Octt +tags: +title: Saved/Sites/Sysadmin + +Saved sites that are mainly about miscellaneous system administration (mainly devlogs, project showcases, or tips+tricks, and online tools). (Some are in other Saved pages and should be moved here.) + +... diff --git a/Wiki-OcttKB/tiddlers/Normal/Saved/_Sites.tid b/Wiki-OcttKB/tiddlers/Normal/Saved/_Sites.tid index 1d664a8..80e054b 100644 --- a/Wiki-OcttKB/tiddlers/Normal/Saved/_Sites.tid +++ b/Wiki-OcttKB/tiddlers/Normal/Saved/_Sites.tid @@ -1,6 +1,6 @@ created: 20230223222804008 creator: Octt -modified: 20231220003130385 +modified: 20231220192502457 modifier: Octt tags: title: Saved/Sites @@ -24,6 +24,7 @@ Note: "[property]-leaning" means the majority of the content of the site, or the * <> * [[koyu's personal website|https://web.koyu.space/]] * [[l33t.codes|https://l33t.codes]] --- Nice emulated retro-style with CRT effects and monospace text of many colors. +* [[LarrySanger.org|https://larrysanger.org/]] --- "//Technology, philosophy, and more//" * [[Leo3418's Personal Site|https://leo3418.github.io/]] --- <<[# Git"https://github.com/Leo3418/leo3418.github.io">> * [[Lily's Things at The Cool Site|https://www.lilysthings.org/]] * [[Lyosha Cluster (Лёша Кластер)|https://cluster.wtf/]] diff --git a/Wiki-OcttKB/tiddlers/Normal/_Data storage.tid b/Wiki-OcttKB/tiddlers/Normal/_Data storage.tid index d91b329..7f2dba6 100644 --- a/Wiki-OcttKB/tiddlers/Normal/_Data storage.tid +++ b/Wiki-OcttKB/tiddlers/Normal/_Data storage.tid @@ -1,6 +1,6 @@ created: 20231104231609952 creator: Octt -modified: 20231104231812092 +modified: 20231220183517988 modifier: Octt tags: title: Data storage @@ -8,3 +8,4 @@ title: Data storage <<^wikipediaframe "Data storage">> * <> +* [[Storj|https://storj.io]] --- //Decentralized cloud object storage that is affordable, easy to use, private, and secure.// --- <<[# Git"https://github.com/storj">> diff --git a/Wiki-OcttKB/tiddlers/Normal/_Nginx.tid b/Wiki-OcttKB/tiddlers/Normal/_Nginx.tid index 5a511a0..1a88134 100644 --- a/Wiki-OcttKB/tiddlers/Normal/_Nginx.tid +++ b/Wiki-OcttKB/tiddlers/Normal/_Nginx.tid @@ -1,6 +1,6 @@ created: 20230207185112276 creator: Octt -modified: 20230817232253417 +modified: 20231220183101374 modifier: Octt tags: title: Nginx @@ -13,6 +13,7 @@ title: Nginx * [[How to set up Nginx as a caching reverse proxy?|https://serverfault.com/questions/30705/how-to-set-up-nginx-as-a-caching-reverse-proxy]] * Nginx reverse proxy + URL rewrite: [[most correct way and best practice is usually...|https://serverfault.com/a/870620]] * [[If is Evil… when used in location context|https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/]] --- (always dangerous in locations, except when doing `return ...;` or `rewrite ... last;`) +* [[How to reply with 200+content from Nginx, without serving a file?|https://serverfault.com/questions/196929/how-to-reply-with-200-from-nginx-without-serving-a-file]] * [[Install more_set_headers in nginx for Debian-based distro|https://serverfault.com/questions/954708/install-more-set-headers-in-nginx-1-15-8]] --- `apt install nginx-extras`, keeping in mind that it will rewrite the nginx core package, so any active nginx daemon will crash and need to be restarted. ** Apparently all extra modules get enabled by default after this installation, and some might crash on some systems: if so, delete their symlinks from `/etc/nginx/modules-enabled`. diff --git a/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt index 79b49ad..a1fe1be 100644 --- a/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt +++ b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt @@ -6,55 +6,10 @@ set -x # Echo all commands TargetWiki="OcttKB" TargetRepo="OcttKB" -git clone --depth 1 "https://gitlab.com/octtspacc/$TargetRepo" "./Repo-$TargetRepo" -cd "./Repo-$TargetRepo" -rm -rf "./Wiki-$TargetWiki" || true +git clone --depth 1 "https://gitlab.com/octtspacc/${TargetRepo}" "./Repo-${TargetRepo}" +cd "./Repo-${TargetRepo}" +rm -rf "./Wiki-${TargetWiki}" || true -tiddlywiki \ - --verbose \ - --load "../$TargetWiki.html" \ - --output "./Wiki-$TargetWiki" \ - --savewikifolder "./Wiki-$TargetWiki" +sh ../WikiFileToFolder.sh "${TargetWiki}" -cd "./Wiki-$TargetWiki/tiddlers" - -for Dir in Normal System -do mkdir -vp "../${Dir}" "../${Dir}.tmp" -done - -mv \$__* ../System.tmp/ || true -mv * ../Normal.tmp/ || true -#mv .* ../Normal.tmp/ || true -cd .. - -# Note: if the hell happens again: -# find -type f -name .tid -exec sh -c 'OldFile="{}"; Ext="$(echo "${OldFile}" | rev | cut -d"." -f1 | rev)"; NewFile="$(echo "${OldFile}" | sed -e "s|_|/|g" | rev | cut -d"." -f2- | rev)_.${Ext}"; mv "$OldFile" "$NewFile"; ' \; - -for TypeDir in System Normal -do - cd "./${TypeDir}.tmp" - for OldFile in * - do - #Ext="$(echo "${OldFile}" | rev | cut -d"." -f1 | rev)" - #NewFile="$(echo "${OldFile}" | sed -e 's|_|/|g' | rev | cut -d"." -f2- | rev)_.${Ext}" - NewPath="$(echo "${OldFile}" | sed -e 's|_|/|g')" - NewName="$(basename "${NewPath}")" - NewParent="$(echo "${NewPath}" | rev | cut -d"/" -f2- | rev)" - { [ "${NewPath}" = "${NewName}" ] && [ "${NewPath}" = "${NewParent}" ] ;} \ - && NewFile="_${NewPath}" \ - || NewFile="${NewParent}/_${NewName}" - #[ "$(basename "${NewFile}") | cut -b1" = . ] - mkdir -p "../${TypeDir}/${NewFile}" - rm -rf "../${TypeDir}/${NewFile}" - mv "./${OldFile}" "../${TypeDir}/${NewFile}" - done - cd .. -done - -mv ./System ./System.tmp/System -mv ./System.tmp/System/\$ ./System -mv ./System ./Normal ./tiddlers -rm -rf ./System.tmp ./Normal.tmp - -cd .. GitPush "OcttKB Cross-Repo Sync (HTML to Raw)" diff --git a/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt.meta b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt.meta index 10f1aca..f228565 100644 --- a/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt.meta +++ b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_GitLab.CrossRepoSync.sh.txt.meta @@ -1,6 +1,6 @@ created: 20230611200714094 creator: Octt -modified: 20230611213201141 +modified: 20231220190816419 modifier: Octt title: $:/OcttKB/Repo/GitLab.CrossRepoSync.sh type: text/plain \ No newline at end of file diff --git a/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt new file mode 100644 index 0000000..eea264d --- /dev/null +++ b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt @@ -0,0 +1,48 @@ +#!/bin/sh +set -e # Exit on any error +set -x # Echo all commands +TargetWiki="$1" + +tiddlywiki \ + --verbose \ + --load "../${TargetWiki}.html" \ + --output "./Wiki-${TargetWiki}" \ + --savewikifolder "./Wiki-${TargetWiki}" + +cd "./Wiki-${TargetWiki}/tiddlers" + +for Dir in Normal System +do mkdir -vp "../${Dir}" "../${Dir}.tmp" +done + +mv \$__* ../System.tmp/ || true +mv * ../Normal.tmp/ || true +cd .. + +# Note: if the hell happens again, run: +# find -type f -name .tid -exec sh -c 'OldFile="{}"; Ext="$(echo "${OldFile}" | rev | cut -d"." -f1 | rev)"; NewFile="$(echo "${OldFile}" | sed -e "s|_|/|g" | rev | cut -d"." -f2- | rev)_.${Ext}"; mv "${OldFile}" "${NewFile}"; ' \; + +for TypeDir in System Normal +do + cd "./${TypeDir}.tmp" + for OldFile in * + do + NewPath="$(echo "${OldFile}" | sed -e 's|_|/|g')" + NewName="$(basename "${NewPath}")" + NewParent="$(echo "${NewPath}" | rev | cut -d"/" -f2- | rev)" + { [ "${NewPath}" = "${NewName}" ] && [ "${NewPath}" = "${NewParent}" ] ;} \ + && NewFile="_${NewPath}" \ + || NewFile="${NewParent}/_${NewName}" + mkdir -p "../${TypeDir}/${NewFile}" + rm -rf "../${TypeDir}/${NewFile}" + mv "./${OldFile}" "../${TypeDir}/${NewFile}" + done + cd .. +done + +mv ./System ./System.tmp/System +mv ./System.tmp/System/\$ ./System +mv ./System ./Normal ./tiddlers +rm -rf ./System.tmp ./Normal.tmp + +cd .. diff --git a/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt.meta b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt.meta new file mode 100644 index 0000000..e913a1b --- /dev/null +++ b/Wiki-OcttKB/tiddlers/System/OcttKB/Repo/_WikiFileToFolder.sh.txt.meta @@ -0,0 +1,6 @@ +created: 20231220185529849 +creator: Octt +modified: 20231220191122279 +modifier: Octt +title: $:/OcttKB/Repo/WikiFileToFolder.sh +type: text/plain \ No newline at end of file diff --git a/Wiki-OcttKB/tiddlers/System/_HistoryList.json.meta b/Wiki-OcttKB/tiddlers/System/_HistoryList.json.meta index 6e9e607..2e8a56e 100644 --- a/Wiki-OcttKB/tiddlers/System/_HistoryList.json.meta +++ b/Wiki-OcttKB/tiddlers/System/_HistoryList.json.meta @@ -1,5 +1,5 @@ -created: 20231220005258685 +created: 20231220200755642 current-tiddler: GettingStarted -modified: 20231220005258685 +modified: 20231220200755642 title: $:/HistoryList type: application/json \ No newline at end of file diff --git a/Wiki-OcttKB/tiddlers/System/_StoryList.tid b/Wiki-OcttKB/tiddlers/System/_StoryList.tid index 906886c..accc33d 100644 --- a/Wiki-OcttKB/tiddlers/System/_StoryList.tid +++ b/Wiki-OcttKB/tiddlers/System/_StoryList.tid @@ -1,6 +1,6 @@ -created: 20231219155706359 +created: 20231220200703107 creator: Octt list: -modified: 20231220004850449 +modified: 20231220200720061 modifier: Octt title: $:/StoryList \ No newline at end of file diff --git a/Wiki-OcttKB/tiddlers/System/state/_showeditpreview.tid b/Wiki-OcttKB/tiddlers/System/state/_showeditpreview.tid index 7336564..4b412ee 100644 --- a/Wiki-OcttKB/tiddlers/System/state/_showeditpreview.tid +++ b/Wiki-OcttKB/tiddlers/System/state/_showeditpreview.tid @@ -1,7 +1,7 @@ created: 20220920140732083 creator: Octt -modified: 20231203235213426 +modified: 20231220184116843 modifier: Octt title: $:/state/showeditpreview -yes \ No newline at end of file +no \ No newline at end of file diff --git a/Wiki-OcttKB/tiddlers/System/state/tab/_sidebar--595412856.tid b/Wiki-OcttKB/tiddlers/System/state/tab/_sidebar--595412856.tid index 0c751f2..776799d 100644 --- a/Wiki-OcttKB/tiddlers/System/state/tab/_sidebar--595412856.tid +++ b/Wiki-OcttKB/tiddlers/System/state/tab/_sidebar--595412856.tid @@ -1,6 +1,6 @@ created: 20220920092307479 creator: Octt -modified: 20231220004843615 +modified: 20231220200726244 modifier: Octt title: $:/state/tab/sidebar--595412856 diff --git a/Wiki-OcttKB/tiddlers/System/state/tree/$/Macros/_.tid b/Wiki-OcttKB/tiddlers/System/state/tree/$/Macros/_.tid index b477d10..1a3c95e 100644 --- a/Wiki-OcttKB/tiddlers/System/state/tree/$/Macros/_.tid +++ b/Wiki-OcttKB/tiddlers/System/state/tree/$/Macros/_.tid @@ -1,7 +1,7 @@ created: 20221108155618185 creator: Octt -modified: 20231107213421541 +modified: 20231220183958793 modifier: Octt title: $:/state/tree/$:/Macros/ -show \ No newline at end of file +hide \ No newline at end of file diff --git a/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/Repo/_.tid b/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/Repo/_.tid index 294df18..d44f054 100644 --- a/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/Repo/_.tid +++ b/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/Repo/_.tid @@ -1,6 +1,6 @@ created: 20230219190716748 creator: Octt -modified: 20231103222548896 +modified: 20231220200723587 modifier: Octt title: $:/state/tree/$:/OcttKB/Repo/ diff --git a/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/_.tid b/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/_.tid index 4d409da..de4ad71 100644 --- a/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/_.tid +++ b/Wiki-OcttKB/tiddlers/System/state/tree/$/OcttKB/_.tid @@ -1,6 +1,6 @@ created: 20230111084703963 creator: Octt -modified: 20231105151708695 +modified: 20231220200724835 modifier: Octt title: $:/state/tree/$:/OcttKB/ diff --git a/Wiki-OcttKB/tiddlers/System/state/tree/$/Styles/_.tid b/Wiki-OcttKB/tiddlers/System/state/tree/$/Styles/_.tid index b6b4214..ce6c120 100644 --- a/Wiki-OcttKB/tiddlers/System/state/tree/$/Styles/_.tid +++ b/Wiki-OcttKB/tiddlers/System/state/tree/$/Styles/_.tid @@ -1,7 +1,7 @@ created: 20230108193801573 creator: Octt -modified: 20231107223043873 +modified: 20231220183957474 modifier: Octt title: $:/state/tree/$:/Styles/ -show \ No newline at end of file +hide \ No newline at end of file