Always better
This commit is contained in:
parent
170f755cb4
commit
e2e1536a26
3
12345.sh
3
12345.sh
|
@ -471,7 +471,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||||
## CREATE PSEUDO FROM
|
## CREATE PSEUDO FROM
|
||||||
if [[ ! $PSEUDO ]]; then
|
if [[ ! $PSEUDO ]]; then
|
||||||
PSEUDO=$(echo ${EMAIL} | cut -d '@' -f 1)
|
PSEUDO=$(echo ${EMAIL} | cut -d '@' -f 1)
|
||||||
PSEUDO=${PSEUDO,,}; PSEUDO=${PSEUDO%%[0-9]*}${RANDOM:0:3}
|
PSEUDO=${PSEUDO,,}; PSEUDO=${PSEUDO%%[0-9]*}${RANDOM:0:4}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d ~/.zen/game/players/${EMAIL} ]]; then
|
if [[ ! -d ~/.zen/game/players/${EMAIL} ]]; then
|
||||||
|
@ -557,7 +557,6 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||||
# CHOICE = "Video" Page MP3 Web
|
# CHOICE = "Video" Page MP3 Web
|
||||||
~/.zen/Astropor.ONE/ajouter_media.sh "$(urldecode $wsource)" "$PLAYER" "$CHOICE" &
|
~/.zen/Astropor.ONE/ajouter_media.sh "$(urldecode $wsource)" "$PLAYER" "$CHOICE" &
|
||||||
|
|
||||||
|
|
||||||
echo "## Insertion tiddler : G1CopierYoutube"
|
echo "## Insertion tiddler : G1CopierYoutube"
|
||||||
echo '[
|
echo '[
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -54,15 +54,17 @@ if [[ ! -s ~/.zen/game/players/${PLAYER}/ipfs/cesium.json ]]; then
|
||||||
# SITE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.socials' 2>/dev/null)
|
# SITE=$(cat ~/.zen/game/players/${PLAYER}/ipfs/gchange.json | jq -r '.socials' 2>/dev/null)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "${PLAYER} GCHANGE+ PROFILE https://gchange.fr"
|
echo "GCHANGE+ PROFILE https://gchange.fr"
|
||||||
# echo "set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}""
|
# echo "set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}""
|
||||||
########################################################################
|
########################################################################
|
||||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" -s "https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS" #GCHANGE+
|
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://data.gchange.fr" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" -s "https://ipfs.copylaradio.com/ipns/$ASTRONAUTENS" #GCHANGE+
|
||||||
[[ ! $? == 0 ]] && echo "GCHANGE PROFILE CREATION FAILED"
|
[[ ! $? == 0 ]] && echo "GCHANGE PROFILE CREATION FAILED"
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
## SET CESIUM WALLET
|
## SET CESIUM WALLET
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "${PLAYER} CESIUM+ PROFILE https://demo.cesium.app/#/app/wot/lg?q=$G1PUB"
|
echo "CESIUM+ https://demo.cesium.app/#/app/wot/lg?q=$G1PUB"
|
||||||
########################################################################
|
########################################################################
|
||||||
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" --s "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS" #CESIUM+
|
$MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "https://g1.data.e-is.pro" set -n "${NAME}" -d "${DESCR}" -v "${VILLE}" -a "${ADRESSE}" --s "http://ipfs.localhost:8080/ipns/$ASTRONAUTENS" #CESIUM+
|
||||||
[[ ! $? == 0 ]] && echo "CESIUM PROFILE CREATION FAILED"
|
[[ ! $? == 0 ]] && echo "CESIUM PROFILE CREATION FAILED"
|
||||||
|
@ -75,8 +77,8 @@ $MY_PATH/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey -n "ht
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
echo "### ${PLAYER} ##########################################################"
|
echo "### ${PLAYER} #################"
|
||||||
echo "SCANNING - $G1PUB Gchange FRIENDS"
|
echo "SCANNING - $G1PUB STAR FRIENDS"
|
||||||
echo "########################################################################"
|
echo "########################################################################"
|
||||||
################## CHECKING WHO GAVE ME STARS
|
################## CHECKING WHO GAVE ME STARS
|
||||||
################## BOOTSTRAP LIKES THEM BACK
|
################## BOOTSTRAP LIKES THEM BACK
|
||||||
|
@ -90,7 +92,7 @@ echo "Checking received stars"
|
||||||
-k ~/.zen/game/players/${PLAYER}/secret.dunikey \
|
-k ~/.zen/game/players/${PLAYER}/secret.dunikey \
|
||||||
-n "https://data.gchange.fr" stars > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json
|
-n "https://data.gchange.fr" stars > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json
|
||||||
|
|
||||||
[[ ! $(cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r '.likes[].issuer') ]] && echo "Niveau Ŋ0 - Activez le niveau de confiance Ŋ1" && exit 0
|
[[ ! $(cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r '.likes[].issuer') ]] && echo "Activez votre Toile de Confiance Ŋ1 sur GChange" && exit 0
|
||||||
|
|
||||||
cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r '.likes[].issuer' | sort | uniq > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/liking_me
|
cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r '.likes[].issuer' | sort | uniq > ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/liking_me
|
||||||
# echo "cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r" # DEBUG
|
# echo "cat ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/received_stars.json | jq -r" # DEBUG
|
||||||
|
|
|
@ -93,7 +93,7 @@ if [[ $SALT != "" && PEPPER != "" ]]; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
################################################################################
|
################################################################################
|
||||||
TWMODEL="/ipfs/bafybeianfzhqxzj3gaftabguuapp3qcmauuk7jnqwywihur2a42cwgzcie"
|
TWMODEL="/ipfs/bafybeigkzns3u2aq2smcmaomhz6n35d2icstty3geqibf2ho4ysljvbcmq"
|
||||||
# ipfs cat $TWMODEL > templates/twdefault.html
|
# ipfs cat $TWMODEL > templates/twdefault.html
|
||||||
##################################################### # NEW PLAYER ###############
|
##################################################### # NEW PLAYER ###############
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -118,7 +118,7 @@ PSEUDO=${PLAYER%%[0-9]*}
|
||||||
[[ ! $PSEUDO ]] && echo "Choisissez un pseudo : " && read PSEUDO
|
[[ ! $PSEUDO ]] && echo "Choisissez un pseudo : " && read PSEUDO
|
||||||
PSEUDO=${PSEUDO,,}
|
PSEUDO=${PSEUDO,,}
|
||||||
PSEUDO=${PSEUDO%%[0-9]*}
|
PSEUDO=${PSEUDO%%[0-9]*}
|
||||||
[[ $(ls ~/.zen/game/players/$PSEUDO* 2>/dev/null) ]] && echo "CE PSEUDO EST DEJA UN PLAYER. EXIT" && exit 1
|
[[ $(ls ~/.zen/game/players/$PSEUDO 2>/dev/null) ]] && echo "CE PSEUDO EST DEJA UN PLAYER. EXIT" && exit 1
|
||||||
|
|
||||||
# PSEUDO=${PSEUDO,,} #lowercase
|
# PSEUDO=${PSEUDO,,} #lowercase
|
||||||
[[ ! $PLAYER ]] && PLAYER=${PSEUDO}${RANDOM:0:2}$(${MY_PATH}/diceware.sh 1 | xargs)${RANDOM:0:2} \
|
[[ ! $PLAYER ]] && PLAYER=${PSEUDO}${RANDOM:0:2}$(${MY_PATH}/diceware.sh 1 | xargs)${RANDOM:0:2} \
|
||||||
|
@ -227,31 +227,35 @@ G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost)
|
sed -i "s~127.0.0.1~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # 8080 & 5001 BEING THE RECORDING GATEWAY (WAN or ipfs.localhost)
|
||||||
|
|
||||||
###########
|
###########
|
||||||
echo "# CRYPTO SELFT ENCODING secret.dunikey put in Tiddler MadeInZion._SECRET_ "
|
echo "# CRYPTO ENCODING _SECRET_ "
|
||||||
echo $myIP > ~/.zen/tmp/${MOATS}/myIP
|
echo $myIP > ~/.zen/tmp/${MOATS}/myIP
|
||||||
$MY_PATH/natools.py encrypt -p $G1PUB -i $HOME/.zen/game/players/$PLAYER/secret.dunikey -o $HOME/.zen/tmp/${MOATS}/secret.dunikey.$G1PUB.enc
|
$MY_PATH/natools.py encrypt -p $G1PUB -i $HOME/.zen/game/players/$PLAYER/secret.dunikey -o $HOME/.zen/tmp/${MOATS}/secret.dunikey.$G1PUB.enc
|
||||||
ENCODING=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey.$G1PUB.enc | base16)
|
ENCODING=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey.$G1PUB.enc | base16)
|
||||||
sed -i "s~_SECRET_~$ENCODING~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
sed -i "s~_SECRET_~$ENCODING~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
###########
|
###########
|
||||||
echo "# CRYPTO DECODING TEST"
|
echo "# CRYPTO DECODING TESTING..."
|
||||||
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/${MOATS} --render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
|
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html --output ~/.zen/tmp/${MOATS} --render '.' 'MadeInZion.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion'
|
||||||
cat ~/.zen/tmp/${MOATS}/MadeInZion.json | jq -r .[].secret | base16 -d > ~/.zen/tmp/${MOATS}/myIP.$G1PUB.enc.2
|
cat ~/.zen/tmp/${MOATS}/MadeInZion.json | jq -r .[].secret | base16 -d > ~/.zen/tmp/${MOATS}/myIP.$G1PUB.enc.2
|
||||||
$MY_PATH/natools.py decrypt -f pubsec -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -i $HOME/.zen/tmp/${MOATS}/myIP.$G1PUB.enc.2 -o $HOME/.zen/tmp/${MOATS}/myIP.2
|
$MY_PATH/natools.py decrypt -f pubsec -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -i $HOME/.zen/tmp/${MOATS}/myIP.$G1PUB.enc.2 -o $HOME/.zen/tmp/${MOATS}/myIP.2
|
||||||
###########
|
###########
|
||||||
## CRYPTO PROCESS VALIDATED
|
## CRYPTO PROCESS VALIDATED
|
||||||
[[ -s ~/.zen/tmp/${MOATS}/myIP.2 ]] && echo "NATOOLS ENCODED secret LOADED" \
|
[[ -s ~/.zen/tmp/${MOATS}/myIP.2 ]] && echo "NATOOLS LOADED" \
|
||||||
|| sed -i "s~$ENCODING~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # Revert to plaintext _SECRET_ myIP
|
|| sed -i "s~$ENCODING~$myIP~g" ~/.zen/game/players/$PLAYER/ipfs/moa/index.html # Revert to plaintext _SECRET_ myIP
|
||||||
rm -f ~/.zen/tmp/${MOATS}/myIP.2
|
rm -f ~/.zen/tmp/${MOATS}/myIP.2
|
||||||
###########
|
###########
|
||||||
|
|
||||||
# Create"$PLAYER_feed" Key
|
# Create"$PLAYER_feed" Key
|
||||||
${MY_PATH}/keygen -t ipfs -o ~/.zen/game/players/$PLAYER/secret.feed "$SALT" "Feed"
|
${MY_PATH}/keygen -t ipfs -o ~/.zen/game/players/$PLAYER/secret.feed "$SALT" "Feed"
|
||||||
FEEDNS=$(ipfs key import "$PLAYER_feed" -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.feed)
|
FEEDNS=$(ipfs key import "$PLAYER_feed" -f pem-pkcs8-cleartext ~/.zen/game/players/$PLAYER/secret.feed)
|
||||||
|
|
||||||
## MAKE LightBeam Plugin Tiddler $PLAYER_feed
|
## MAKE LightBeam Plugin Tiddler $PLAYER_feed
|
||||||
|
# $:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key
|
||||||
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-name","text":"'${PLAYER}_feed'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-name.json
|
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-name","text":"'${PLAYER}_feed'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-name.json
|
||||||
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key","text":"'${FEEDNS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-key.json
|
echo '[{"title":"$:/plugins/astroport/lightbeams/saver/ipns/lightbeam-key","text":"'${FEEDNS}'","tags":""}]' > ~/.zen/tmp/${MOATS}/lightbeam-key.json
|
||||||
|
|
||||||
|
echo "$PLAYER_feed"
|
||||||
|
cat ~/.zen/tmp/${MOATS}/lightbeam-key.json
|
||||||
|
|
||||||
## ADD SYSTEM TW
|
## ADD SYSTEM TW
|
||||||
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \
|
tiddlywiki --load ~/.zen/game/players/$PLAYER/ipfs/moa/index.html \
|
||||||
--import ~/.zen/tmp/${MOATS}/lightbeam-name.json "application/json" \
|
--import ~/.zen/tmp/${MOATS}/lightbeam-name.json "application/json" \
|
||||||
|
@ -259,7 +263,7 @@ G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
--import ~/.zen/Astroport.ONE/templates/data/local.api.json "application/json" \
|
--import ~/.zen/Astroport.ONE/templates/data/local.api.json "application/json" \
|
||||||
--import ~/.zen/Astroport.ONE/templates/data/local.gw.json "application/json" \
|
--import ~/.zen/Astroport.ONE/templates/data/local.gw.json "application/json" \
|
||||||
--output ~/.zen/tmp/${MOATS} --render "$:/core/save/all" "newindex.html" "text/plain"
|
--output ~/.zen/tmp/${MOATS} --render "$:/core/save/all" "newindex.html" "text/plain"
|
||||||
[[ -f ~/.zen/tmp/${MOATS}/newindex.html ]] && cp ~/.zen/tmp/${MOATS}/newindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
[[ -s ~/.zen/tmp/${MOATS}/newindex.html ]] && cp -f ~/.zen/tmp/${MOATS}/newindex.html ~/.zen/game/players/$PLAYER/ipfs/moa/index.html
|
||||||
|
|
||||||
## ID CARD & QRCODE
|
## ID CARD & QRCODE
|
||||||
convert ~/.zen/game/players/$PLAYER/QR.png -resize 300 ~/.zen/tmp/${MOATS}/QR.png
|
convert ~/.zen/game/players/$PLAYER/QR.png -resize 300 ~/.zen/tmp/${MOATS}/QR.png
|
||||||
|
@ -308,11 +312,12 @@ G1PUB=$(cat ~/.zen/tmp/${MOATS}/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2)
|
||||||
|
|
||||||
qrencode -s 12 -o "$HOME/.zen/game/players/$PLAYER/QR.ASTRONAUTENS.png" "https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"
|
qrencode -s 12 -o "$HOME/.zen/game/players/$PLAYER/QR.ASTRONAUTENS.png" "https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"
|
||||||
|
|
||||||
echo; echo "Création de votre Clef et QR codes d'accès au niveau Astroport Ŋ1"; sleep 1
|
echo; echo "Création Clefs et QR codes pour accès au niveau Astroport Ŋ1"; sleep 1
|
||||||
|
|
||||||
echo; echo "*** HOME : ~/.zen/game/players/$PLAYER/"; sleep 1
|
echo "--- PLAYER : $PLAYER";
|
||||||
echo "*** PLAYER : $PLAYER";
|
echo; echo "VISA : https://ipfs.copylaradio.com/ipns/${IASTRO}"
|
||||||
echo; echo "VOTRE TW : https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"; sleep 1
|
echo; echo "+ TW : https://ipfs.copylaradio.com/ipns/${ASTRONAUTENS}"
|
||||||
|
echo; echo "+ RSS : https://ipfs.copylaradio.com/ipns/${FEEDNS}"; sleep 1
|
||||||
|
|
||||||
# PASS CRYPTING KEY
|
# PASS CRYPTING KEY
|
||||||
#~ echo; echo "Sécurisation de vos clefs... "; sleep 1
|
#~ echo; echo "Sécurisation de vos clefs... "; sleep 1
|
||||||
|
|
Loading…
Reference in New Issue