decrypt & use .ipfs.filelink
This commit is contained in:
parent
449626645e
commit
e325c0e8cd
|
@ -42,17 +42,23 @@ do
|
||||||
## I am the destination of that "todo / not done" wpcall
|
## I am the destination of that "todo / not done" wpcall
|
||||||
echo "$ipfnodesource wants to publish $mediakey"
|
echo "$ipfnodesource wants to publish $mediakey"
|
||||||
## GET ipns link + title + xzuid
|
## GET ipns link + title + xzuid
|
||||||
ipnsid=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/KEY/$mediakey/$g1pubsource/.ipns.link)
|
|
||||||
title=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/KEY/$mediakey/$g1pubsource/.title)
|
title=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/KEY/$mediakey/$g1pubsource/.title)
|
||||||
xzuid=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/_xbian.zuid)
|
xzuid=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/_xbian.zuid)
|
||||||
|
|
||||||
mynodename=$(cat ~/.zen/ipfs_swarm/.$IPFSNODEID/G1SSB/_nodename)
|
mynodename=$(cat ~/.zen/ipfs_swarm/.$IPFSNODEID/G1SSB/_nodename)
|
||||||
genres="$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/KEY/$mediakey/$g1pubsource/ajouter_video.txt | cut -d ';' -f 6 | sed 's/|/,/g' | awk '{print tolower($0)}')"
|
genres="$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/KEY/$mediakey/$g1pubsource/ajouter_video.txt | cut -d ';' -f 6 | sed 's/|/,/g' | awk '{print tolower($0)}')"
|
||||||
|
|
||||||
|
## USE .ipns.link
|
||||||
|
# ipnsid=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/KEY/$mediakey/$g1pubsource/.ipns.link)
|
||||||
|
## USE .ipfs.filelink
|
||||||
|
if [[ -f ~/.zen/ipfs_swarm/.${ipfnodesource}/KEY/${mediakey}/${g1pubsource}/${G1PUB}/.ipfs.filelink.encrypt ]]; then
|
||||||
|
$MY_PATH/tools/natools.py decrypt -f pubsec -k "$HOME/.zen/secret.dunikey" -i "$HOME/.zen/ipfs_swarm/.${ipfnodesource}/KEY/${mediakey}/${g1pubsource}/${G1PUB}/.ipfs.filelink.encrypt" -o "/tmp/filelink_$mediakey.txt"
|
||||||
|
fi
|
||||||
|
|
||||||
# 1=DIY, Habiter=2, Guerir=3, Divertir=4, Déplacer=5, Energie=6, Cultiver=7
|
# 1=DIY, Habiter=2, Guerir=3, Divertir=4, Déplacer=5, Energie=6, Cultiver=7
|
||||||
cd /var/www/wordpress/
|
cd /var/www/wordpress/
|
||||||
# isWPuser=$(wp user list | grep "$xzuid")
|
# isWPuser=$(wp user list | grep "$xzuid")
|
||||||
wp post create --post_author="$xzuid" --post_content="<p><a href=\"https://$mynodename/ipns/$ipnsid\" target=\"_blank\" rel=\"noreferrer noopener\">$title</a></p>" --post_title="$title" --post_excerpt="$g1pubsource" --post_category="105" --tags_input="$genres" --porcelain
|
wp post create --post_author="$xzuid" --post_content="<p><a href=\"https://$mynodename$(cat /tmp/filelink_$mediakey.txt)\" target=\"_blank\" rel=\"noreferrer noopener\">$title</a></p>" --post_title="$title" --post_excerpt="$g1pubsource" --post_category="105" --tags_input="$genres" --porcelain
|
||||||
|
|
||||||
# REPLY IN ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey/done
|
# REPLY IN ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey/done
|
||||||
responsedir="$(echo "$wpcall" | sed 's/ipfs_swarm/ipfs/g')"
|
responsedir="$(echo "$wpcall" | sed 's/ipfs_swarm/ipfs/g')"
|
||||||
|
|
Loading…
Reference in New Issue