From 51f760f35b39474bf8fcc3918ef12d773b951c5a Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 14 Jan 2024 19:05:53 +0100 Subject: [PATCH] better namings --- BOOSTRAP/Readme.md | 2 +- RUNTIME/SECTOR.refresh.sh | 2 +- RUNTIME/VISA.new.sh | 4 +- install_lazydocker_linux.sh | 24 + search | 4 +- templates/twsector.html | 3149 ++++++++++++++++++++ templates/{minimal.html => twuplanet.html} | 0 tools/RSS2UPlanetTW.sh | 2 +- 8 files changed, 3180 insertions(+), 7 deletions(-) create mode 100755 install_lazydocker_linux.sh create mode 100644 templates/twsector.html rename templates/{minimal.html => twuplanet.html} (100%) diff --git a/BOOSTRAP/Readme.md b/BOOSTRAP/Readme.md index 7ffa65ea..ed8f275f 100644 --- a/BOOSTRAP/Readme.md +++ b/BOOSTRAP/Readme.md @@ -20,7 +20,7 @@ keygen --help PLAYER key & wishes can be controled through : ```~/.zen/Astroport.ONE/command.sh``` or directly through TW (Tag="voeu") Each wish, is a derivated key, it has an IPNS publishing and can be associated to its own ASTROBOT program to take care about Friends data collect & merge. -VISA.new.sh is creating TW from ```templates/twdefault.html``` and ```templates/minimal.html``` +VISA.new.sh is creating TW from ```templates/twdefault.html``` and ```templates/twuplanet.html``` This script is important as it initialize PLAYER and connect him to STATION... You can add more different templates... Visit https://tiddlywiki.com to understand all the capacities this tools have inside. diff --git a/RUNTIME/SECTOR.refresh.sh b/RUNTIME/SECTOR.refresh.sh index 47bf68a9..154f0a55 100755 --- a/RUNTIME/SECTOR.refresh.sh +++ b/RUNTIME/SECTOR.refresh.sh @@ -143,7 +143,7 @@ for SECTOR in ${SECTORS[@]}; do ## NEW TW TEMPLATE [[ ! -s ${INDEX} ]] \ - && sed "s~_SECTOR_~${SECTOR}~g" ${MY_PATH}/../templates/empty.html > ${INDEX} \ + && sed "s~_SECTOR_~${SECTOR}~g" ${MY_PATH}/../templates/twsector.html > ${INDEX} \ && echo "REFRESHING SECTOR FROM empty TEMPLATE *****" ## SET SECTOR diff --git a/RUNTIME/VISA.new.sh b/RUNTIME/VISA.new.sh index 4e98135f..6a71f871 100755 --- a/RUNTIME/VISA.new.sh +++ b/RUNTIME/VISA.new.sh @@ -36,7 +36,7 @@ LIBRA=$(head -n 2 ${MY_PATH}/../A_boostrap_nodes.txt | tail -n 1 | cut -d ' ' -f TWMODEL="/ipfs/bafybeie6sx76balvpeehvbh5du7oc5fhjuwydryympeh3qnm5s3b2jrvwe" # ipfs cat $TWMODEL > templates/twdefault.html MINIMAL="/ipfs/bafybeicpfrsx44lkib4352eulvohmgdpaww3sau3qtbj7fzj6qw7xsokhy" -# ipfs cat $MINIMAL > templates/minimal.html +# ipfs cat $MINIMAL > templates/twuplanet.html ################################################################################ mkdir -p ~/.zen/tmp/${MOATS}/TW @@ -71,7 +71,7 @@ if [[ $SALT != "" && PEPPER != "" ]]; then # COPY TW TEMPLATE [[ ${LON} && ${LAT} ]] \ - && cp ${MY_PATH}/../templates/minimal.html ~/.zen/tmp/${MOATS}/TW/index.html \ + && cp ${MY_PATH}/../templates/twuplanet.html ~/.zen/tmp/${MOATS}/TW/index.html \ || cp ${MY_PATH}/../templates/twdefault.html ~/.zen/tmp/${MOATS}/TW/index.html else diff --git a/install_lazydocker_linux.sh b/install_lazydocker_linux.sh new file mode 100755 index 00000000..33003c02 --- /dev/null +++ b/install_lazydocker_linux.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# allow specifying different destination directory +DIR="${DIR:-"$HOME/.local/bin"}" + +# map different architecture variations to the available binaries +ARCH=$(uname -m) +case $ARCH in + i386|i686) ARCH=x86 ;; + armv6*) ARCH=armv6 ;; + armv7*) ARCH=armv7 ;; + aarch64*) ARCH=arm64 ;; +esac + +# prepare the download URL +GITHUB_LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/jesseduffield/lazydocker/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') +GITHUB_FILE="lazydocker_${GITHUB_LATEST_VERSION//v/}_$(uname -s)_${ARCH}.tar.gz" +GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${GITHUB_LATEST_VERSION}/${GITHUB_FILE}" + +# install/update the local binary +curl -L -o lazydocker.tar.gz $GITHUB_URL +tar xzvf lazydocker.tar.gz lazydocker +install -Dm 755 lazydocker -t "$DIR" +rm lazydocker lazydocker.tar.gz diff --git a/search b/search index 5964bb25..26cfc2e9 100755 --- a/search +++ b/search @@ -6,11 +6,11 @@ if [ "$1" == "" ]; then else echo " Searching for "$1" recursively. Please Wait..." echo "------------------------------------------------------------------------------" - grep -h -r --exclude-dir='.git*' --exclude='minimal.html' --exclude='empty.html' -H --colour=always "$1" ./ + grep -h -r --exclude-dir='.git*' --exclude='twuplanet.html' --exclude='twsector.html' -H --colour=always "$1" ./ fi echo "------------------------------------------------------------------------------" if [ "$2" != "" ]; then echo " To replace \"$1\" whith \"$2\", please run" - echo " grep -rl --exclude-dir='.git*' --exclude='minimal.html' --exclude='empty.html' '$1' ./ | xargs sed -i 's~$1~$2~g'" + echo " grep -rl --exclude-dir='.git*' --exclude='twuplanet.html' --exclude='twsector.html' '$1' ./ | xargs sed -i 's~$1~$2~g'" fi ## THIS IS A GREAT RETRO ENGINEERING AND CODING TOOLS diff --git a/templates/twsector.html b/templates/twsector.html new file mode 100644 index 00000000..0822e55d --- /dev/null +++ b/templates/twsector.html @@ -0,0 +1,3149 @@ + + + + + + + + + + + + + + + + + + + + +UPlanet _SECTOR_ TW — Distributed Information System + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/templates/minimal.html b/templates/twuplanet.html similarity index 100% rename from templates/minimal.html rename to templates/twuplanet.html diff --git a/tools/RSS2UPlanetTW.sh b/tools/RSS2UPlanetTW.sh index 9315790b..ce60e8a1 100755 --- a/tools/RSS2UPlanetTW.sh +++ b/tools/RSS2UPlanetTW.sh @@ -20,7 +20,7 @@ INDEX=$4 ## SECTOR TW index file [[ ! -s ${RSS} ]] && echo "BAD RSS INPUT" && exit 1 [[ ! -d ~/.zen/tmp/${MOATS}/${SECTOR}/ ]] && echo "BAD UPLANET CONTEXT" && exit 1 [[ ! -s ${INDEX} ]] \ - && sed "s~_SECTOR_~${SECTOR}~g" ${MY_PATH}/../templates/empty.html > ${INDEX} \ + && sed "s~_SECTOR_~${SECTOR}~g" ${MY_PATH}/../templates/twsector.html > ${INDEX} \ && echo "REFRESHING SECTOR FROM empty TEMPLATE *****"