# COPY TIDDLER JSON TO DESKTOP Journal/${TYPE} & Clipboard paste Ctrl+V

This commit is contained in:
fred 2022-04-23 19:40:59 +02:00
parent d2c3925455
commit 616adfa6ec
2 changed files with 26 additions and 23 deletions

View File

@ -33,12 +33,12 @@ URL="$1"
if [ $URL ]; then
echo "URL: $URL"
REVSOURCE="$(echo "$URL" | awk -F/ '{print $3}' | rev)_"
[ ! $2 ] && IMPORT=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Choisissez comment copier cette source" --entry-text="Video" MP3 Web) || IMPORT="Youtube"
[ ! $2 ] && IMPORT=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Que copier depuis cette source ?" --entry-text="Video" MP3 Web) || IMPORT="Youtube"
[[ $IMPORT == "Video" ]] && IMPORT="Youtube"
CHOICE="$IMPORT"
fi
[[ $CHOICE == "Web" ]] && CHOICE=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Cette source WEB est à enregistrer comme " --entry-text="Page" WebSite)
[[ $CHOICE == "Web" ]] && CHOICE=$(zenity --entry --width 640 --title="$URL => Astroport" --text="Cette source Web est à enregistrer comme " --entry-text="Page" WebSite)
# REMOVE GtkDialog errors for zenity
shopt -s expand_aliases
@ -623,6 +623,6 @@ cat /tmp/${MEDIAKEY}.log
if [ ! $2 ]; then
[ $? == 0 ] && \
zenity --question --width 300 --text "OK! ~/astroport/Add_${MEDIAKEY}_script.sh ($FILE_SIZE). Voulez-vous lancer immédiatement l'ajout dans Astroport ?"; \
[ $? == 0 ] && bash ~/astroport/Add_${MEDIAKEY}_script.sh "no" || exit 0 \
[ $? == 0 ] && bash ~/astroport/Add_${MEDIAKEY}_script.sh "no"; zenity --question --width 300 --text "Collez le résultat dans votre Journal. FIN."; || exit 0 \
|| zenity --warning --width 300 --text "Désolé une erreur est survenue... /tmp/${MEDIAKEY}.log" && exit 1
fi

View File

@ -344,9 +344,6 @@ IPNSLINK=$(ipfs key list -l | grep ${MEDIAKEY} | cut -d ' ' -f 1)
## MODIFY INTO "./zen/ipns_TAG_refresh.sh" (add crypto/contracts there)
########################################################################
## COPY LOCALHOST IPFS URL TO CLIPBOARD
[[ $(which xclip) ]] && echo "http://127.0.0.1:8080/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME" | xclip -selection c
########################################################################
########################################################################
## PUBLISH new IPNS
@ -443,12 +440,18 @@ echo '[
]
' > ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json
# COPY TO DESKTOP Journal
[[ "$USER" != "xbian" && -d ~/Bureau ]] && mkdir -p ~/Bureau/Journal && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Bureau/Journal/
[[ "$USER" != "xbian" && -d ~/Desktop ]] && mkdir -p ~/Desktop/Journal && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Desktop/Journal/
# COPY TIDDLER JSON TO DESKTOP Journal/${TYPE}
[[ "$USER" != "xbian" && -d ~/Bureau ]] && mkdir -p ~/Bureau/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Bureau/Journal/${TYPE}/${TITLE}.dragdrop.json
[[ "$USER" != "xbian" && -d ~/Desktop ]] && mkdir -p ~/Desktop/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Desktop/Journal/${TYPE}/${TITLE}.dragdrop.json
fi
## COPY LOCALHOST IPFS URL TO CLIPBOARD
[[ $(which xclip) ]] &&\
[[ $TEXT == "" ]] &&\
echo "http://127.0.0.1:8080/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME" | xclip -selection c ||\
echo "$TEXT" | xclip -selection c
########################################################################
# PUBLISH GENERAL video
########################################################################