better
This commit is contained in:
parent
6fb049c192
commit
46ab6f015f
|
@ -54,12 +54,15 @@ Content-Type: text/html; charset=UTF-8
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
# YOUTUBE : /?player=PLAYER&youtube=_URL_
|
# YOUTUBE : /?player=PLAYER&(youtube | pdf | image) =_URL_
|
||||||
##############################################
|
##############################################
|
||||||
if [[ ${APPNAME} == "youtube" ]]; then
|
if [[ ${APPNAME} == "youtube" || ${APPNAME} == "pdf" || ${APPNAME} == "image" ]]; then
|
||||||
|
|
||||||
|
APPNAME=$(echo ${APPNAME} | sed -r 's/\<./\U&/g' | sed 's/ //g') ## First letter Capital
|
||||||
|
|
||||||
[[ ! ${WHAT} ]] && WHAT="https://www.youtube.com/watch?v=BCl2-0HBJ2c"
|
[[ ! ${WHAT} ]] && WHAT="https://www.youtube.com/watch?v=BCl2-0HBJ2c"
|
||||||
echo "COPY YOUTUBE ${PLAYER} ${WHAT}"
|
|
||||||
|
echo ">>> COPY ${APPNAME} for ${PLAYER} from ${WHAT}"
|
||||||
|
|
||||||
G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub)
|
G1PUB=$(cat ~/.zen/game/players/${PLAYER}/.g1pub)
|
||||||
[[ ! ${G1PUB} ]] && espeak "NOT MY PLAYER " && echo "${PLAYER} IS NOT MY PLAYER" && exit 1
|
[[ ! ${G1PUB} ]] && espeak "NOT MY PLAYER " && echo "${PLAYER} IS NOT MY PLAYER" && exit 1
|
||||||
|
@ -69,7 +72,7 @@ Content-Type: text/html; charset=UTF-8
|
||||||
echo " = /ipfs/${TW}"
|
echo " = /ipfs/${TW}"
|
||||||
echo "================================================"
|
echo "================================================"
|
||||||
|
|
||||||
${MY_PATH}/../ajouter_media.sh "${WHAT}" "${PLAYER}" "Video" &
|
${MY_PATH}/../ajouter_media.sh "${WHAT}" "${PLAYER}" "${APPNAME}" &
|
||||||
|
|
||||||
echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}.${PLAYER}.http
|
echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}.${PLAYER}.http
|
||||||
echo "${myIPFS}/ipns/${ASTRONAUTENS}" >> ~/.zen/tmp/${MOATS}.${PLAYER}.http
|
echo "${myIPFS}/ipns/${ASTRONAUTENS}" >> ~/.zen/tmp/${MOATS}.${PLAYER}.http
|
||||||
|
@ -80,6 +83,7 @@ Content-Type: text/html; charset=UTF-8
|
||||||
end=`date +%s`
|
end=`date +%s`
|
||||||
echo "(TW) MOA Operation time was "`expr $end - $start` seconds.
|
echo "(TW) MOA Operation time was "`expr $end - $start` seconds.
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|
26
API/SALT.sh
26
API/SALT.sh
|
@ -376,11 +376,15 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||||
g1friend=${WHAT}
|
g1friend=${WHAT}
|
||||||
stars=${VAL:-1} // Default 1 ★
|
stars=${VAL:-1} // Default 1 ★
|
||||||
|
|
||||||
$MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key stars -p $g1friend -n $stars
|
$MY_PATH/../tools/jaklis/jaklis.py -k ~/.zen/tmp/coucou/${MOATS}.secret.key stars -p $g1friend -n $stars > ~/.zen/tmp/coucou/${MOATS}.log
|
||||||
|
|
||||||
|
(
|
||||||
|
echo "$HTTPCORS $(cat ~/.zen/tmp/coucou/${MOATS}.log)"| nc -l -p ${PORT} -q 1 > /dev/null 2>&1
|
||||||
|
) &
|
||||||
|
|
||||||
rm ~/.zen/tmp/coucou/${MOATS}.*
|
rm ~/.zen/tmp/coucou/${MOATS}.*
|
||||||
#~ echo "$HTTPCORS ${MESTAR}"| nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &
|
end=`date +%s`
|
||||||
#~ end=`date +%s`
|
echo $APPNAME "(☉_☉ ) ${MESTAR} Execution time was "`expr $end - $start` seconds.
|
||||||
#~ echo $APPNAME "(☉_☉ ) ${MESTAR} Execution time was "`expr $end - $start` seconds.
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -401,11 +405,14 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||||
# GETG1PUB
|
# GETG1PUB
|
||||||
##############################################
|
##############################################
|
||||||
if [[ $APPNAME == "getg1pub" ]]; then
|
if [[ $APPNAME == "getg1pub" ]]; then
|
||||||
( echo "$HTTPCORS
|
(
|
||||||
url='"${G1PUB}"'" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && echo "SLURP getg1pub : ${G1PUB}" ) &
|
echo "$HTTPCORS
|
||||||
|
url='"${G1PUB}"'" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 && echo "SLURP getg1pub : ${G1PUB}"
|
||||||
|
echo "BLURP ${PORT}"
|
||||||
|
) &
|
||||||
end=`date +%s`
|
end=`date +%s`
|
||||||
echo $APPNAME "(☉_☉ ) /ipns/${ASTRONAUTENS} Execution time was "`expr $end - $start` seconds.
|
echo $APPNAME "(☉_☉ ) /ipns/${ASTRONAUTENS} Execution time was "`expr $end - $start` seconds.
|
||||||
rm ~/.zen/tmp/coucou/${MOATS}.*
|
rm ~/.zen/tmp/coucou/${MOATS}*
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -435,9 +442,10 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh
|
||||||
#~ sed -i "s~_UPEPPER_~${UPEPPER}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
|
#~ sed -i "s~_UPEPPER_~${UPEPPER}~g" ~/.zen/tmp/coucou/${MOATS}.index.redirect
|
||||||
echo "url='"${REPLACE}"'" >> ~/.zen/tmp/coucou/${MOATS}.index.redirect
|
echo "url='"${REPLACE}"'" >> ~/.zen/tmp/coucou/${MOATS}.index.redirect
|
||||||
(
|
(
|
||||||
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
|
||||||
echo "BLURP " && rm ~/.zen/tmp/coucou/${MOATS}*
|
echo "BLURP ${PORT}"
|
||||||
) &
|
) &
|
||||||
|
rm ~/.zen/tmp/coucou/${MOATS}*
|
||||||
end=`date +%s`
|
end=`date +%s`
|
||||||
echo $APPNAME "(☉_☉ ) Execution time was "`expr $end - $start` seconds.
|
echo $APPNAME "(☉_☉ ) Execution time was "`expr $end - $start` seconds.
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -264,7 +264,7 @@ GET /?player=${PLAYER}&moa=json&tag=G1CopierYoutube
|
||||||
| `tag` | `${VAL}` | TW filtering default G1CopierYoutube |
|
| `tag` | `${VAL}` | TW filtering default G1CopierYoutube |
|
||||||
|
|
||||||
|
|
||||||
### Lancer la copie Video d'une URL Youtube par PLAYER
|
### Lancer la copie d'une URL (youtube | pdf ) par PLAYER dans son TW
|
||||||
```http
|
```http
|
||||||
GET /?player=${PLAYER}&youtube=URLENCODED
|
GET /?player=${PLAYER}&youtube=URLENCODED
|
||||||
```
|
```
|
||||||
|
@ -272,8 +272,7 @@ GET /?player=${PLAYER}&youtube=URLENCODED
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| :-------- | :------- | :-------------------------------- |
|
| :-------- | :------- | :-------------------------------- |
|
||||||
| `player` | `string` | **Required**. Your EMAIL token |
|
| `player` | `string` | **Required**. Your EMAIL token |
|
||||||
| `youtube` | `string` | **Required** URL = Video URL |
|
| `youtube | pdf` | `string` | **Required** URL kind = URL |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### QRCODE (API SandBox)
|
### QRCODE (API SandBox)
|
||||||
|
|
Loading…
Reference in New Issue