# COPY TIDDLER JSON TO DESKTOP Journal/${TYPE} & Clipboard paste Ctrl+V
This commit is contained in:
parent
d2c3925455
commit
616adfa6ec
|
@ -33,12 +33,12 @@ URL="$1"
|
||||||
if [ $URL ]; then
|
if [ $URL ]; then
|
||||||
echo "URL: $URL"
|
echo "URL: $URL"
|
||||||
REVSOURCE="$(echo "$URL" | awk -F/ '{print $3}' | rev)_"
|
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"
|
[[ $IMPORT == "Video" ]] && IMPORT="Youtube"
|
||||||
CHOICE="$IMPORT"
|
CHOICE="$IMPORT"
|
||||||
fi
|
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
|
# REMOVE GtkDialog errors for zenity
|
||||||
shopt -s expand_aliases
|
shopt -s expand_aliases
|
||||||
|
@ -623,6 +623,6 @@ cat /tmp/${MEDIAKEY}.log
|
||||||
if [ ! $2 ]; then
|
if [ ! $2 ]; then
|
||||||
[ $? == 0 ] && \
|
[ $? == 0 ] && \
|
||||||
zenity --question --width 300 --text "OK! ~/astroport/Add_${MEDIAKEY}_script.sh ($FILE_SIZE). Voulez-vous lancer immédiatement l'ajout dans Astroport ?"; \
|
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
|
|| zenity --warning --width 300 --text "Désolé une erreur est survenue... /tmp/${MEDIAKEY}.log" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -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)
|
## 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
|
## PUBLISH new IPNS
|
||||||
|
@ -412,21 +409,21 @@ then
|
||||||
echo "----------------- REFRESH LOCAL KODI INDEX ----------------------"
|
echo "----------------- REFRESH LOCAL KODI INDEX ----------------------"
|
||||||
cat ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN ~/.zen/ipfs_swarm/.12D*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
|
cat ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN ~/.zen/ipfs_swarm/.12D*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
|
||||||
|
|
||||||
GENRE=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/ajouter_video.txt | cut -d ';' -f 6 | sed 's/|/ /g' )
|
GENRE=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/ajouter_video.txt | cut -d ';' -f 6 | sed 's/|/ /g' )
|
||||||
MIME=$(file --mime-type "$HOME/astroport/${TYPE}/${REFERENCE}/${file}" | cut -d ':' -f 2 | cut -d ' ' -f 2)
|
MIME=$(file --mime-type "$HOME/astroport/${TYPE}/${REFERENCE}/${file}" | cut -d ':' -f 2 | cut -d ' ' -f 2)
|
||||||
if [[ $(echo "$MIME" | grep 'video') ]]; then
|
if [[ $(echo "$MIME" | grep 'video') ]]; then
|
||||||
TEXT="<video controls><source src='/ipfs/"${IPFSID}"' type='"${MIME}"'></video><h1>"${TITLE}"</h1>"
|
TEXT="<video controls><source src='/ipfs/"${IPFSID}"' type='"${MIME}"'></video><h1>"${TITLE}"</h1>"
|
||||||
MIME="txt/html"
|
MIME="txt/html"
|
||||||
TAGS="${CAT} astroport $GENRE"
|
TAGS="${CAT} astroport $GENRE"
|
||||||
CANON=''
|
CANON=''
|
||||||
else
|
else
|
||||||
TEXT=''
|
TEXT=''
|
||||||
TAGS='$:/isAttachment $:/isIpfs astroport '${CAT} $GENRE
|
TAGS='$:/isAttachment $:/isIpfs astroport '${CAT} $GENRE
|
||||||
CANON="/ipfs/"${IPFSID}
|
CANON="/ipfs/"${IPFSID}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "## Creation json tiddler"
|
echo "## Creation json tiddler"
|
||||||
echo '[
|
echo '[
|
||||||
{
|
{
|
||||||
"text": "'${TEXT}'",
|
"text": "'${TEXT}'",
|
||||||
"title": "'${TITLE}'",
|
"title": "'${TITLE}'",
|
||||||
|
@ -443,12 +440,18 @@ echo '[
|
||||||
]
|
]
|
||||||
' > ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json
|
' > ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json
|
||||||
|
|
||||||
# COPY TO DESKTOP Journal
|
# COPY TIDDLER JSON TO DESKTOP Journal/${TYPE}
|
||||||
[[ "$USER" != "xbian" && -d ~/Bureau ]] && mkdir -p ~/Bureau/Journal && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Bureau/Journal/
|
[[ "$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 && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Desktop/Journal/
|
[[ "$USER" != "xbian" && -d ~/Desktop ]] && mkdir -p ~/Desktop/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Desktop/Journal/${TYPE}/${TITLE}.dragdrop.json
|
||||||
|
|
||||||
fi
|
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
|
# PUBLISH GENERAL video
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
Loading…
Reference in New Issue