diff --git a/ASCI_ASTROPORT.txt b/ASCI_ASTROPORT.txt index ffa2fe96..3b0e4271 100644 --- a/ASCI_ASTROPORT.txt +++ b/ASCI_ASTROPORT.txt @@ -5,3 +5,13 @@ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# ### ### ######## ### ### ### ######## ### ######## ### ### ### + + +_____/\/\_____ ____________ ___/\/\_____ ____________ ____________ ____________ ____________ ____________ ___/\/\_____ +___/\/\/\/\___ ___/\/\/\/\_ _/\/\/\/\/\_ _/\/\__/\/\_ ___/\/\/\___ _/\/\/\/\___ ___/\/\/\___ _/\/\__/\/\_ _/\/\/\/\/\_ +_/\/\____/\/\_ _/\/\/\/\___ ___/\/\_____ _/\/\/\/\___ _/\/\__/\/\_ _/\/\__/\/\_ _/\/\__/\/\_ _/\/\/\/\___ ___/\/\_____ +_/\/\/\/\/\/\_ _______/\/\_ ___/\/\_____ _/\/\_______ _/\/\__/\/\_ _/\/\/\/\___ _/\/\__/\/\_ _/\/\_______ ___/\/\_____ +_/\/\____/\/\_ _/\/\/\/\___ ___/\/\/\___ _/\/\_______ ___/\/\/\___ _/\/\_______ ___/\/\/\___ _/\/\_______ ___/\/\/\___ +______________ ____________ ____________ ____________ ____________ _/\/\_______ ____________ ____________ ____________ + + diff --git a/ajouter_media.sh b/ajouter_media.sh index 7f154f4c..8c242813 100755 --- a/ajouter_media.sh +++ b/ajouter_media.sh @@ -50,8 +50,7 @@ players=($(ls ~/.zen/game/players | grep -Ev "localhost" 2>/dev/null)) PLAYER=$OUTPUT -[[ $OUTPUT ]] && ( 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" +[[ $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 == "" ]] \ && ${MY_PATH}/start.sh \ @@ -234,6 +233,7 @@ YID=$(echo "$LINE" | cut -d '&' -f 1) TITLE=$(echo "$LINE" | cut -d '&' -f 2- | detox --inline) /usr/local/bin/youtube-dl -f "(bv*[ext=mp4][height<=720]+ba/b[height<=720])" \ + --no-playlist \ --cookies-from-browser $BROWSER --verbose --audio-format mp3\ --download-archive $HOME/.zen/.yt-dlp.list \ -S res,ext:mp4:m4a --recode mp4 --no-mtime --embed-thumbnail --add-metadata \ @@ -495,6 +495,7 @@ else [[ $YTURL == "" ]] && YTURL="$artist" espeak "Copying Link" /usr/local/bin/youtube-dl \ +--no-playlist \ --cookies-from-browser $BROWSER \ --ignore-errors --no-mtime \ --embed-thumbnail --metadata-from-title "%(artist)s - %(title)s" --add-metadata \ diff --git a/tools/make_image_ipfs_index_carousel.sh b/tools/make_image_ipfs_index_carousel.sh new file mode 100755 index 00000000..408ba977 --- /dev/null +++ b/tools/make_image_ipfs_index_carousel.sh @@ -0,0 +1,101 @@ +#!/bin/bash +MY_PATH="`dirname \"$0\"`" # relative +MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized +. "$MY_PATH/my.sh" + +#Set Path to Images +img_dir="$1" +[[ ! -d $img_dir ]] && echo "Not a directory" && exit 1 + +#Set Path to HTML page +html_file="/tmp/index.html" + +#Create HTML page +echo " + + +Astroport IPFS Gallery + + + + + + +
+

Astroport IPFS $(myPlayer) Gallery $(date)

+
+ + + + +
" >> $html_file + +#Loop over images +num=1 +for i in "$img_dir"/*; do +if [[ $i =~ \.(jpg|png|jpeg|gif)$ ]]; then + ilink=$(ipfs add -q $i) + img_info=$(identify -format '%w %h %[EXIF:*]' $i) + img_width=$(echo $img_info | cut -d ' ' -f1) + img_height=$(echo $img_info | cut -d ' ' -f2) + img_alt=$(echo $img_info | cut -d ' ' -f3) + if [ $num -eq 1 ]; then + echo "
+ \"$img_alt\" +
" >> $html_file + else + echo "
+ \"$img_alt\" +
" >> $html_file + fi + num=$((num+1)) +fi +done + +echo "
+ + + + + + + + +
+
+ + + + + + +" >> $html_file + +htmlipfs=$(ipfs add -q $html_file) +xdg-open ${myIPFSGW}/ipfs/$htmlipfs + +exit 0