Skip to content

Commit

Permalink
Update WuppiMini, Add TiVuOcto, Update Build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
octospacc committed Jul 30, 2024
1 parent 53204d0 commit 260dc1e
Show file tree
Hide file tree
Showing 16 changed files with 2,023 additions and 897 deletions.
15 changes: 9 additions & 6 deletions Build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/sh
SourceApps="SpiderADB WuppiMini"
SourceApps="SpiderADB TiVuOcto WuppiMini"
HubSdkApps="${SourceApps} MatrixStickerHelper TiktOctt"
HtmlHeadInject='<script src="../../shared/OctoHub-Global.js"></script>'

quoteVar(){ echo '"'"$1"'"' ;}

getMetaAttr(){
file="$1"
name="$2"
key="$([ -n "$3" ] && echo "$3" || echo "property")"
key="$([ -n "$3" ] && echo "$3" || echo property)"
grep '<meta '"$key"'="'"$name"'"' "$file" | grep '>' | cut -d '"' -f4
}

Expand All @@ -30,9 +31,9 @@ node ../WriteRedirectPages.js
for App in ${HubSdkApps}
do
file="./${App}/index.html"
name="$(getMetaAttr "${file}" og:title)"
description="$(getMetaAttr "${file}" og:description property)"
url="$(getMetaAttr "${file}" Url OctoSpaccHubSdk)" #"$(getMetaAttr "${file}" og:url property)"
name="$( getMetaAttr "${file}" og:title)"
description="$(getMetaAttr "${file}" og:description)"
url="$( getMetaAttr "${file}" Url OctoSpaccHubSdk)"
cat << [OctoSpaccHubSdk-WebManifest-EOF] > "./${App}/WebManifest.json"
{
$(getMetaAttr "${file}" WebManifestExtra OctoSpaccHubSdk | sed s/\'/\"/g)
Expand All @@ -42,5 +43,7 @@ do
"name": "${name}"
}
[OctoSpaccHubSdk-WebManifest-EOF]
sed -i 's|</head>|<title>'"${name}"'</title><link rel="manifest" href="./WebManifest.json"/></head>|' "${file}"
htmltitle='<title>'"${name}"'</title>'
htmlcanonical='<link rel="canonical" href="'"${url}"'"/>'
sed -i 's|</head>|<link rel="manifest" href="./WebManifest.json"/>'"${htmltitle}${htmlcanonical}${htmlmanifest}${HtmlHeadInject}"'</head>|' "${file}"
done
1,247 changes: 571 additions & 676 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions source/SpiderADB/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta property="og:title" content="🕷️ SpiderADB"/>
<meta property="og:title" content="SpiderADB"/>
<meta OctoSpaccHubSdk="Url" content="https://hub.octt.eu.org/SpiderADB/"/>
<meta OctoSpaccHubSdk="WebManifestExtra" content="'display':'standalone', 'icons':[{ 'src':'./icon.png', 'type':'image/png', 'sizes':'512x512' }],"/>
<link rel="apple-touch-icon" href="./icon.png"/>
Expand All @@ -15,7 +15,6 @@
<script src="./util.js"></script>
<script src="./holo-web/holo-extra-octt.js"></script>
<script src="./holo-web/holo-touch.js"></script>
<script src="../../shared/OctoHub-Global.js"></script>
<style>
.floatRight { float: right; }
body { overflow-x: hidden; padding-bottom: 0; overflow-wrap: break-word; }
Expand Down
6 changes: 3 additions & 3 deletions source/SpiderADB/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions source/TiVuOcto/Build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
echo index.html node_modules
3 changes: 3 additions & 0 deletions source/TiVuOcto/Requirements.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
npm update
npm install
Loading

0 comments on commit 260dc1e

Please sign in to comment.