Agg. interni

This commit is contained in:
2023-03-14 15:23:35 +01:00
parent 8944998c4f
commit 6a2167b535
13 changed files with 104 additions and 45 deletions

View File

@ -10,8 +10,13 @@ python3 ../staticoso/App/Source/Build.py \
--GemtextHeader="\
# Spacc
" #\
" \
--MastodonURL="https://botsin.space" \
--MastodonToken="$MastodonToken;Debug=True" \
--ActivityPubHoursLimit="0"
#--DiffBuild="True" \
#--GemtextOutput=True #\
#--MastodonURL="https://botsin.space" \
#--MastodonToken="$MastodonToken"
sh ./Scripts/PostBuild.Common.sh

View File

@ -1,4 +0,0 @@
#!/bin/sh
cd public
npx planktos .

View File

@ -4,3 +4,6 @@ python3.10 ./staticoso/App/Source/Build.py \
--SiteDomain="https://sitoctt.octt.eu.org" \
--FolderRoots="{'*':'https://octtspacc.gitlab.io', 'Assets':'http://http.sitoctt-assets.octt.eu.org/public'}" \
--DynamicParts="{'Head':['Twemoji.html'], 'Footer':['StatCounter.html'], 'Other':['CountWindow.html']}"
sh ./Scripts/PostBuild.Common.sh
sh ./Scripts/Prepare.NoStyle.sh

View File

@ -13,3 +13,6 @@ Alcune informazioni importanti sono disponibili su:
=> /octt/index.gmi octocapsula/index
"
sh ./Scripts/PostBuild.Common.sh
sh ./Scripts/Prepare.NoStyle.sh

View File

@ -5,4 +5,5 @@ python3 ../staticoso/Source/Build.py \
--FolderRoots="{'*':'/', 'Assets':'/sitoctt-assets'}" \
--NoScripts=True
sh ./Scripts/PostBuild.Common.sh
sh ./Scripts/Prepare.NoStyle.sh

40
Scripts/Lib/SelfBuild.js Normal file
View File

@ -0,0 +1,40 @@
const Exp = {};
Exp.Fs = require('fs');
// https://stackoverflow.com/a/69049676
Exp.importAll = function importAll(){ delete this.importAll; Object.assign(global, this); };
Exp.TryStringToList = In => {
if (typeof(In) == 'string') {
return In.split(',');
} else {
return In;
};
};
Exp.Range = (Start, Stop, Step) => {
Step = Step || 1;
return Array.from(
{ length: (Stop - Start) / Step + 1 },
(value, index) => Start + index * Step,
);
};
Exp.Unpack = (Left, Middle, Right) => {
var Str = '';
TryStringToList(Middle).forEach(function(Target) {
Str += `${Left}${Target}${Right}`;
});
return Str;
};
// Make a CSS string basically emulating the :where selector, for old browsers
Exp.Where = (Left, Middle, Right) => {
var Style = '';
TryStringToList(Middle).forEach(function(Target) {
Style += `${Left}${Target}${Right},`;
});
return Style.slice(0, -1);
};
module.exports = Exp;

View File

@ -0,0 +1,8 @@
#!/bin/sh
# Common action after the base site build succeeded
# Compile self-executable assets
#for Dir in public public.*
#do
find ./public/Assets/ -type f -name "*.*.SelfBuild.js" -exec sh -c "echo {}; node {}; rm {}" \;
#done