G1Feed
This commit is contained in:
parent
02ceb888aa
commit
3eba17427d
|
@ -110,6 +110,11 @@ do
|
|||
--output ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME} \
|
||||
--render '.' ${PLAYER}'.tiddlers.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' '[tag[G1'${WISHNAME}']!tag[G1Voeu]]'
|
||||
|
||||
### PREPARE WISHNAME index.html
|
||||
cat $MY_PATH/../templates/index_gif4.html \
|
||||
| sed -e "s~_LIBRA_~$(myIpfsGw)~g" -e "s~_G1VOEU_~${WISHNAME}~g" "s~_PLAYER_~${PLAYER}~g" \
|
||||
> ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/index.html
|
||||
|
||||
### ADD TO IPFS
|
||||
echo "++WISH PUBLISHING++ ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/*"
|
||||
JSONIPFS=$(ipfs add -qHwr ~/.zen/tmp/${IPFSNODEID}/${PLAYER}/g1voeu/${WISHNAME}/* | tail -n 1) # ADDING JSONS TO IPFS
|
||||
|
|
|
@ -45,14 +45,16 @@ CHOICE="$3"
|
|||
players=($(ls ~/.zen/game/players | grep -Ev "localhost" 2>/dev/null))
|
||||
|
||||
[[ ${#players[@]} -ne 1 ]] \
|
||||
&& espeak "CHOOSE PLAYER" && OUTPUT=$(zenity --entry --width 640 --title="=> Astroport" --text="ASTRONAUTE ?" --entry-text=${players[@]}) \
|
||||
&& espeak "SELECT YOUR PLAYER" && OUTPUT=$(zenity --entry --width 640 --title="=> Astroport" --text="ASTRONAUTE ?" --entry-text=${players[@]}) \
|
||||
|| OUTPUT="${players}"
|
||||
|
||||
PLAYER=$OUTPUT
|
||||
|
||||
[[ $OUTPUT ]] && ( rm -f ~/.zen/game/players/.current && ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current && espeak "CONNECTED" && . "${MY_PATH}/tools/my.sh" ) || espeak "NO PLAYER"
|
||||
[[ $OUTPUT ]] \
|
||||
&& rm -f ~/.zen/game/players/.current && ln -s ~/.zen/game/players/$PLAYER ~/.zen/game/players/.current && espeak "CONNECTED" && . "${MY_PATH}/tools/my.sh" \
|
||||
|| espeak "NO PLAYER"
|
||||
|
||||
[[ $PLAYER == "" ]] \
|
||||
[[ $OUTPUT == "" ]] \
|
||||
&& ${MY_PATH}/start.sh \
|
||||
&& espeak "Astronaut. Please register." \
|
||||
&& xdg-open "http://astroport.localhost:1234" \
|
||||
|
@ -81,10 +83,6 @@ if [ $URL ]; then
|
|||
[[ $IMPORT == "Video" ]] && IMPORT="Youtube"
|
||||
CHOICE="$IMPORT"
|
||||
|
||||
else
|
||||
|
||||
xdg-open "$myIPFS/ipns/$ASTRONAUTENS"
|
||||
|
||||
fi
|
||||
###
|
||||
|
||||
|
@ -158,6 +156,8 @@ done
|
|||
YOU=$(myIpfsApi)
|
||||
[[ ! $YOU ]] && espeak "I P F S not running - EXIT" && exit 1
|
||||
|
||||
[[ ! $URL ]] && xdg-open "$myIPFS/ipns/$ASTRONAUTENS"
|
||||
|
||||
########################################################################
|
||||
espeak "Ready !"
|
||||
########################################################################
|
||||
|
@ -626,7 +626,7 @@ MEDIAKEY="TMDB_$MEDIAID"
|
|||
###
|
||||
TITLE=$(zenity --entry --width 300 --title "Titre" --text "Indiquez le titre de la vidéo" --entry-text="${PRE}")
|
||||
[[ $TITLE == "" ]] && exit 1
|
||||
TITLE=$(echo "${TITLE}" | sed "s/[(][^)]*[)]//g" | sed -e 's/;/_/g' ) # Clean TITLE (NO ;)
|
||||
TITLE=$(echo "${TITLE}" | detox --inline ) # Clean TITLE (NO ;)
|
||||
|
||||
# VIDEO YEAR
|
||||
### CHECK IF PREVIOUS ajouter_video (Serie case)
|
||||
|
|
|
@ -273,7 +273,7 @@ then
|
|||
echo $GENRE $SAISON
|
||||
|
||||
## Add screenshot
|
||||
[[ -f $HOME/Astroport/${TyPE}/${REFERENCE}/screen.png ]] && SCREENSHOT=$(ipfs add -q "$HOME/Astroport/${TyPE}/${REFERENCE}/screen.png" | tail -n 1)
|
||||
[[ -f $HOME/Astroport/${TyPE}/${REFERENCE}/screen.png ]] && ANIMH=$(ipfs add -q "$HOME/Astroport/${TyPE}/${REFERENCE}/screen.png" | tail -n 1) && PROBETIME=0
|
||||
|
||||
|
||||
if [[ $(echo "$MIME" | grep 'video') ]]; then
|
||||
|
@ -318,7 +318,6 @@ then
|
|||
"filesize": "'${FILE_SIZE}'",
|
||||
"size": "'${FILE_BSIZE}'",
|
||||
"description": "'${DESCRIPTION}'",
|
||||
"screenshot": "'/ipfs/${POSTER}'",
|
||||
"g1pub": "'${G1PUB}'",
|
||||
"ipfsroot": "'/ipfs/${IPFSREPFILEID}'",
|
||||
"file": "'${file}'",
|
||||
|
|
Loading…
Reference in New Issue