fraise
This commit is contained in:
parent
7d0f45a4d8
commit
7ffd053c65
|
@ -31,6 +31,16 @@ scuttlebutt() {
|
||||||
mv ~/.ssb_astroport/node_modules/* $node_lib_path/node_modules/
|
mv ~/.ssb_astroport/node_modules/* $node_lib_path/node_modules/
|
||||||
# Create sblob symlink
|
# Create sblob symlink
|
||||||
ln -s $node_lib_path/node_modules/ssb-secret-blob/index.js $node_bin_path/sblob
|
ln -s $node_lib_path/node_modules/ssb-secret-blob/index.js $node_bin_path/sblob
|
||||||
|
|
||||||
|
# INSTALL sbotc
|
||||||
|
if [[ ! $(which sbotc) ]]; then
|
||||||
|
sudo apt install libsodium-dev jq -y
|
||||||
|
git clone https://git.scuttlebot.io/%25133ulDgs%2FoC1DXjoK04vDFy6DgVBB%2FZok15YJmuhD5Q%3D.sha256 sbotc
|
||||||
|
cd sbotc
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TEST ssb-server Install
|
# TEST ssb-server Install
|
||||||
|
|
|
@ -123,7 +123,7 @@ FROM.G1_${g1self}
|
||||||
FROM.IPFS_${ipfsnodeid}
|
FROM.IPFS_${ipfsnodeid}
|
||||||
|
|
||||||
"
|
"
|
||||||
sbotc publish '{"type":"post","text":"#astroport-swarmkey = ['"$name"']('"$id"') TO.SSB_${author} TO.G1_${g1author} +++ FROM.SSB_${self_name} FROM.G1_${g1self} FROM.IPFS_${ipfsnodeid}","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
|
sbotc publish '{"type":"post","text":"#astroport-swarmkey = ['"$name"']('"$id"') TO.SSB_'"$author"' TO.G1_'"$g1author"' +++ FROM.SSB_'"$self_name"' FROM.G1_'"$g1self"' FROM.IPFS_'"$ipfsnodeid"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
|
|
@ -34,63 +34,6 @@ messages=$(sbotc backlinks.read '{"query":[{"$filter":{"dest":"#astroport-swarmk
|
||||||
while read -r msg
|
while read -r msg
|
||||||
do
|
do
|
||||||
|
|
||||||
autofollow=$(printf %s "$msg" | jq .value.content.autofollow)
|
|
||||||
[[ ! $autofollow ]] && echo "I am NOT the Pub..." && echo "$msg" | jq && continue
|
|
||||||
|
|
||||||
echo "
|
|
||||||
___ _______ _ _ ___ ____
|
|
||||||
| |\ |\ /| ||_ / / \|\ || /\ / |
|
|
||||||
_|_| \| \/_|_ ||_ \_\_/| \||/--\\_ | RECEIVED
|
|
||||||
|
|
||||||
|
|
||||||
"
|
|
||||||
author=$(printf %s "$msg" | jq -r .value.author)
|
|
||||||
g1author=$(printf %s "$msg" | jq -r .value.author | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58)
|
|
||||||
|
|
||||||
# Crypt, ipfs store, send
|
|
||||||
if [[ -f ~/.ipfs/swarm.key ]]; then
|
|
||||||
|
|
||||||
|
|
||||||
mkdir -p ~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}
|
|
||||||
|
|
||||||
file=~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}/ipfs_swarm.key.crypt
|
|
||||||
$MY_PATH/tools/natools.py encrypt -p ${g1author} -i ~/.ipfs/swarm.key -o ${file}
|
|
||||||
cp ${file} ~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}/
|
|
||||||
echo "
|
|
||||||
$author
|
|
||||||
|
|
||||||
\|/ \|/ \|/
|
|
||||||
/|\ /|\ /|\ cyphering swarmkey
|
|
||||||
|
|
||||||
IPFS
|
|
||||||
~/.zen/ipfs/.${ipfsnodeid}/INVITE/${g1author}/ipfs_swarm.key.crypt
|
|
||||||
|
|
||||||
"
|
|
||||||
|
|
||||||
name=${file##*/}
|
|
||||||
id="$(sbotc blobs.add < "$file")"
|
|
||||||
type="$(file -b --mime-type "$file")"
|
|
||||||
size="$(wc -c < "$file")"
|
|
||||||
|
|
||||||
echo "
|
|
||||||
______ _ _ _ ____ __ _ _ _ _ _____
|
|
||||||
/\ (_ ||_)/ \|_)/ \|_)|__(_\ //\ |_)|\/||/|_\_/ |_)/ \(_ |
|
|
||||||
/--\__) || \\_/| \_/| \| __)\/\//--\| \| ||\|_ | | \_/__) |
|
|
||||||
|
|
||||||
SSB
|
|
||||||
#astroport-swarmkey
|
|
||||||
[$name]($id)
|
|
||||||
TO.SSB_${author}
|
|
||||||
TO.G1_${g1author}
|
|
||||||
+++
|
|
||||||
FROM.SSB_${self_name}
|
|
||||||
FROM.G1_${g1self}
|
|
||||||
FROM.IPFS_${ipfsnodeid}
|
|
||||||
|
|
||||||
"
|
|
||||||
|
|
||||||
sbotc publish '{"type":"post","text":"#astroport-swarmkey = ['"$name"']('"$id"') TO.SSB_'"$author"' TO.G1_'"$g1author"' +++ FROM.SSB_'"$self_name"' FROM.G1_'"$g1self"' FROM.IPFS_'"$ipfsnodeid"'","mentions":[{"link":"'"$id"'","name":"'"$name"'","size":'"$size"',"type":"'"$type"'"}]}'
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
done < <(printf '%s\n' "$messages")
|
done < <(printf '%s\n' "$messages")
|
||||||
|
|
Loading…
Reference in New Issue