mieux
This commit is contained in:
parent
42801f6525
commit
54f767c116
|
@ -30,44 +30,6 @@ PORT=$1 PLAYER=$2 APPNAME=$3 WHAT=$4 OBJ=$5 VAL=$6
|
||||||
ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1)
|
ASTRONAUTENS=$(ipfs key list -l | grep -w $PLAYER | cut -d ' ' -f1)
|
||||||
[[ ! $ASTRONAUTENS ]] && (echo "$HTTPCORS UNKNOWN PLAYER $PLAYER - EXIT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1
|
[[ ! $ASTRONAUTENS ]] && (echo "$HTTPCORS UNKNOWN PLAYER $PLAYER - EXIT" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && exit 1
|
||||||
|
|
||||||
##############################################
|
|
||||||
# PAY : /?player=PLAYER&pay=1&dest=G1PUB
|
|
||||||
##############################################
|
|
||||||
if [[ $APPNAME == "pay" ]]; then
|
|
||||||
echo "$HTTPCORS" > ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
|
|
||||||
if [[ $WHAT =~ ^[0-9]+$ ]]; then
|
|
||||||
|
|
||||||
echo "${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m"
|
|
||||||
~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \
|
|
||||||
${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey pay -a ${WHAT} -p ${VAL} -c 'Bro' -m 2>&1 >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$WHAT" == "history" ]]; then
|
|
||||||
sed -i "s~text/html~application/json~g" ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \
|
|
||||||
${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey history -j >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$WHAT" == "get" ]]; then
|
|
||||||
sed -i "s~text/html~application/json~g" ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \
|
|
||||||
${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey get >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$WHAT" == "balance" ]]; then
|
|
||||||
~/.zen/Astroport.ONE/tools/timeout.sh -t 20 \
|
|
||||||
${MY_PATH}/../tools/jaklis/jaklis.py -k ~/.zen/game/players/${PLAYER}/secret.dunikey balance >> ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
|
||||||
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
|
||||||
end=`date +%s`
|
|
||||||
echo "(G_G ) G1BANK Operation time was "`expr $end - $start` seconds.
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# MOATUBE : /?player=PLAYER&moa=json&tag=FILTER
|
# MOATUBE : /?player=PLAYER&moa=json&tag=FILTER
|
||||||
##############################################
|
##############################################
|
||||||
|
|
|
@ -116,7 +116,7 @@ PEPPER=$THIS
|
||||||
cat ~/.zen/tmp/coucou/${MOATS}.messaging.json >> ~/.zen/tmp/coucou/${MOATS}.index.redirect
|
cat ~/.zen/tmp/coucou/${MOATS}.messaging.json >> ~/.zen/tmp/coucou/${MOATS}.index.redirect
|
||||||
|
|
||||||
## SEND REPONSE PROCESS IN BACKGROUD
|
## SEND REPONSE PROCESS IN BACKGROUD
|
||||||
cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
(cat ~/.zen/tmp/coucou/${MOATS}.index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && rm ~/.zen/tmp/coucou/${MOATS}.index.redirect ) &
|
||||||
#~ ( ## USING IPNS SESSION KEY
|
#~ ( ## USING IPNS SESSION KEY
|
||||||
#~ REPONSE=$(cat ~/.zen/tmp/coucou/${MOATS}.messaging.json | ipfs add -q)
|
#~ REPONSE=$(cat ~/.zen/tmp/coucou/${MOATS}.messaging.json | ipfs add -q)
|
||||||
#~ ipfs name publish --allow-offline --key=${PORT} /ipfs/$REPONSE
|
#~ ipfs name publish --allow-offline --key=${PORT} /ipfs/$REPONSE
|
||||||
|
@ -385,7 +385,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http
|
||||||
cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
(cat ~/.zen/tmp/$PLAYER.pay.$WHAT.http | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && rm ~/.zen/tmp/$PLAYER.pay.$WHAT.http ) &
|
||||||
end=`date +%s`
|
end=`date +%s`
|
||||||
echo "(G_G ) G1BANK Operation time was "`expr $end - $start` seconds.
|
echo "(G_G ) G1BANK Operation time was "`expr $end - $start` seconds.
|
||||||
exit 0
|
exit 0
|
||||||
|
|
12
README.md
12
README.md
|
@ -230,18 +230,6 @@ GET /?salt=${SALT}&pepper=${PEPPER}&pay=1&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtH
|
||||||
## ➤ PLAYER ZONE (API Station qui héberge ${PLAYER})
|
## ➤ PLAYER ZONE (API Station qui héberge ${PLAYER})
|
||||||
### ```/?player=${PLAYER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...```
|
### ```/?player=${PLAYER}&${APPNAME}=${WHAT}&${OBJ}=${VAL}...```
|
||||||
|
|
||||||
### Déclencher un Payement de 99 Ğ1 à Fred
|
|
||||||
```http
|
|
||||||
GET /?player=${PLAYER}&pay=99&g1pub=DsEx1pS33vzYZg4MroyBV9hCw98j1gtHEhwiZ5tK7ech
|
|
||||||
```
|
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
|
||||||
| :-------- | :------- | :-------------------------------- |
|
|
||||||
| `player` | `string` | **Required**. Your EMAIL token |
|
|
||||||
| `pay` | `integer` | **Required** G1 AMOUNT |
|
|
||||||
| `g1pub` | `G1PUB` | **Required** destination "wallet key" |
|
|
||||||
|
|
||||||
|
|
||||||
### Exporter Tiddlers.json depuis son TW selon valeur des "tags" ( ici TAG=G1CopierYoutube)
|
### Exporter Tiddlers.json depuis son TW selon valeur des "tags" ( ici TAG=G1CopierYoutube)
|
||||||
```http
|
```http
|
||||||
GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube
|
GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube
|
||||||
|
|
10
command.sh
10
command.sh
|
@ -34,7 +34,7 @@ echo 'PRESS ENTER... '; read
|
||||||
|
|
||||||
## CREATE AND OR CONNECT USER
|
## CREATE AND OR CONNECT USER
|
||||||
PS3='Astronaute connectez votre PLAYER ___ '
|
PS3='Astronaute connectez votre PLAYER ___ '
|
||||||
players=("NOUVEAU VISA" "IMPORT PLAYER" $(ls ~/.zen/game/players | grep -Ev "localhost" 2>/dev/null))
|
players=("NOUVEAU VISA" "IMPORT PLAYER" $(ls ~/.zen/game/players | grep "@" 2>/dev/null))
|
||||||
## MULTIPLAYER
|
## MULTIPLAYER
|
||||||
|
|
||||||
select fav in "${players[@]}"; do
|
select fav in "${players[@]}"; do
|
||||||
|
@ -134,11 +134,11 @@ select fav in "${choices[@]}"; do
|
||||||
## REMOVE PLAYER DOCKER
|
## REMOVE PLAYER DOCKER
|
||||||
[[ $USER == "zen" ]] && make player MAIL=$PLAYER DELETE=true
|
[[ $USER == "zen" ]] && make player MAIL=$PLAYER DELETE=true
|
||||||
|
|
||||||
echo "REMOVING GCHANGE+ PROFILE"
|
#~ echo "REMOVING GCHANGE+ PROFILE"
|
||||||
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myDATA" erase
|
#~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myDATA" erase
|
||||||
|
|
||||||
#~ echo "REMOVE CESIUM+"
|
echo "REMOVE CESIUM+"
|
||||||
$MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myCESIUM" erase
|
#~ $MY_PATH/tools/jaklis/jaklis.py -k $HOME/.zen/game/players/$PLAYER/secret.dunikey -n "$myCESIUM" erase
|
||||||
echo "rm -Rf ~/.zen/game/players/$PLAYER"
|
echo "rm -Rf ~/.zen/game/players/$PLAYER"
|
||||||
rm -Rf ~/.zen/game/players/$PLAYER
|
rm -Rf ~/.zen/game/players/$PLAYER
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ if [[ ! -d $img_dir ]]; then
|
||||||
convert -font 'Liberation-Sans' \
|
convert -font 'Liberation-Sans' \
|
||||||
-pointsize 80 -fill purple -draw 'text 50,120 "'"$COINS Ğ1"'"' \
|
-pointsize 80 -fill purple -draw 'text 50,120 "'"$COINS Ğ1"'"' \
|
||||||
-pointsize 30 -fill purple -draw 'text 40, 180 "'"$PLAYER"'"' \
|
-pointsize 30 -fill purple -draw 'text 40, 180 "'"$PLAYER"'"' \
|
||||||
|
-pointsize 14 -fill white -draw 'text 40, 200 "'"$(date)"'"' \
|
||||||
"${HOME}/.zen/tmp/one.png" "${HOME}/.zen/tmp/carousel/${pub}.png" \
|
"${HOME}/.zen/tmp/one.png" "${HOME}/.zen/tmp/carousel/${pub}.png" \
|
||||||
&& rm ${HOME}/.zen/tmp/carousel/${pub}.one.png
|
&& rm ${HOME}/.zen/tmp/carousel/${pub}.one.png
|
||||||
|
|
||||||
|
@ -85,7 +86,7 @@ echo "<link rel=\"stylesheet\" href=\"/ipfs/QmX9QyopkTw9TdeC6yZpFzutfjNFWP36nzfP
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<h3 id=\"countdown\"> $myHOST : $(date)</h3>
|
<h3 id=\"countdown\"> $myHOST :: ${#PLAYERONE[@]}</h3>
|
||||||
|
|
||||||
<div class=\"container\">
|
<div class=\"container\">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue