diff --git a/zen/wordpress_channel.sh b/zen/wordpress_channel.sh index 1a57b96..340a855 100755 --- a/zen/wordpress_channel.sh +++ b/zen/wordpress_channel.sh @@ -42,17 +42,23 @@ do ## I am the destination of that "todo / not done" wpcall echo "$ipfnodesource wants to publish $mediakey" ## 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) xzuid=$(cat ~/.zen/ipfs_swarm/.$ipfnodesource/_xbian.zuid) 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)}')" + ## 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 cd /var/www/wordpress/ # isWPuser=$(wp user list | grep "$xzuid") - wp post create --post_author="$xzuid" --post_content="

$title

" --post_title="$title" --post_excerpt="$g1pubsource" --post_category="105" --tags_input="$genres" --porcelain + wp post create --post_author="$xzuid" --post_content="

$title

" --post_title="$title" --post_excerpt="$g1pubsource" --post_category="105" --tags_input="$genres" --porcelain # REPLY IN ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey/done responsedir="$(echo "$wpcall" | sed 's/ipfs_swarm/ipfs/g')"