rewriting
This commit is contained in:
parent
5d68a278dc
commit
4f4b458c94
|
@ -100,6 +100,31 @@ if [[ ! -f ~/.ipfs/test.disk ]]; then
|
|||
# echo $(curl -s ${GCHANGE}/user/profile/${G1PUB} | jq '._source.geoPoint.lon') > ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_geoPoint.lon
|
||||
fi
|
||||
|
||||
########################################################################
|
||||
## CREATE & CUSTOMIZE WIKI
|
||||
########################################################################
|
||||
echo "####################################################
|
||||
Customisation TiddlyWiki"
|
||||
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/index.html ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID} && cp ~/.zen/astrXbian/.install/templates/tiddlywiki/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||
|
||||
# RESET TilldyWIKI (TODO REMOVE)
|
||||
cp ~/.zen/astrXbian/.install/templates/tiddlyone/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||
|
||||
zuid="$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid )"
|
||||
wiki="/home/$USER/.zen/ipfs/.$IPFSNODEID/index.html"
|
||||
|
||||
sed -i "s/Moa/$zuid/g" $wiki ## (star) pseudo (score)
|
||||
GTITLE="$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title | sed 's/\ /-/g')"
|
||||
sed -i "s/$zuid/$GTITLE/g" $wiki ## (star) pseudo (score)
|
||||
sed -i "s/_IPFSNODEID_/$IPFSNODEID/g" $wiki
|
||||
sed -i "s/_G1PUB_/$G1PUB/g" $wiki
|
||||
# sed -i "s/Personnalisez/<a href=\"http:\/\/127.0.0.1:8181\/ipns\/$IPFSNODEID\/.$IPFSNODEID\/FRIENDS\">Amis de/g" $wiki
|
||||
|
||||
# https:\/\/www.gchange.fr\/#\/app\/records\/wallet?q=$G1PUB
|
||||
########################################################################
|
||||
|
||||
|
||||
########################################################################
|
||||
###
|
||||
#### FRIENDS && BOOTSTRAP ipfstryme MESSAGE sending procedure
|
||||
########################################################################
|
||||
|
@ -109,19 +134,25 @@ ipfsnodeid=${IamINBOOTSTRAP##*/}
|
|||
## FILTER Qm !
|
||||
[[ "${ipfsnodeid:0:2}" != "Qm" && "${ipfsnodeid:0:2}" != "" ]] && IamBOOTSTRAP=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid) || IamBOOTSTRAP="" # Contains G1PUB
|
||||
|
||||
################## AUTO PINNING for BOOTSTRAP
|
||||
########################################################################
|
||||
################## BOOTSTRAP AUTO PINNING NEW MEDIAKEYs
|
||||
[[ $IamBOOTSTRAP ]] && ~/.zen/astrXbian/zen/tools/autoPINfriends.sh
|
||||
################## AUTO PINNING
|
||||
########################################################################
|
||||
|
||||
|
||||
########################################################################
|
||||
################## CHECKING WHO GAVE ME STARS
|
||||
################## BOOTSTRAP LIKES THEM BACK
|
||||
################## SEND ipfstryme MESSAGES to FRIENDS
|
||||
rm -f /tmp/friend_of_mine
|
||||
~/.zen/astrXbian/zen/tools/timeout.sh -t 12 ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' > /tmp/liking_me
|
||||
## Getting Gchange liking_me list
|
||||
~/.zen/astrXbian/zen/tools/timeout.sh -t 20 ~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer' > /tmp/liking_me
|
||||
## Adding random bootstrap to liking_me list
|
||||
~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#" | rev | cut -d '/' -f 1 | rev | shuf | head -n 1) >> /tmp/liking_me
|
||||
|
||||
for liking_me in $(cat /tmp/liking_me | sort | uniq);
|
||||
do
|
||||
[[ "$liking_me" == "" ]] && continue ## Protect from empty line
|
||||
[[ "$liking_me" == "" ]] && continue ## Protect from empty line !!
|
||||
##### BOOTSTRAP AUTO LIKE BACK (NOT liking Myself)
|
||||
if [[ "$IamBOOTSTRAP" == "$G1PUB" ]]; then
|
||||
echo "I AM A BOOTSTRAP AUTO LIKING $liking_me FRIEND"
|
||||
|
@ -185,27 +216,6 @@ done
|
|||
# REMOVE NOT ANYMORE FRIENDS ~/.zen/ipfs/.${IPFSNODEID}/FRIENDS/$liking_me/
|
||||
## TODO compare with /tmp/friend_of_mine
|
||||
|
||||
|
||||
##
|
||||
echo "####################################################
|
||||
Customisation TiddlyWiki"
|
||||
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/index.html ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID} && cp ~/.zen/astrXbian/.install/templates/tiddlywiki/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||
|
||||
# RESET TilldyWIKI (TODO REMOVE)
|
||||
cp ~/.zen/astrXbian/.install/templates/tiddlyone/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||
|
||||
zuid="$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid )"
|
||||
wiki="/home/$USER/.zen/ipfs/.$IPFSNODEID/index.html"
|
||||
|
||||
sed -i "s/Moa/$zuid/g" $wiki ## (star) pseudo (score)
|
||||
GTITLE="$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title | sed 's/\ /-/g')"
|
||||
sed -i "s/$zuid/$GTITLE/g" $wiki ## (star) pseudo (score)
|
||||
sed -i "s/_IPFSNODEID_/$IPFSNODEID/g" $wiki
|
||||
sed -i "s/_G1PUB_/$G1PUB/g" $wiki
|
||||
# sed -i "s/Personnalisez/<a href=\"http:\/\/127.0.0.1:8181\/ipns\/$IPFSNODEID\/.$IPFSNODEID\/FRIENDS\">Amis de/g" $wiki
|
||||
|
||||
# https:\/\/www.gchange.fr\/#\/app\/records\/wallet?q=$G1PUB
|
||||
|
||||
# REFRESH IPNS SELF PUBLISH
|
||||
########################################################################
|
||||
~/.zen/astrXbian/zen/ipns_self_publish.sh
|
||||
|
|
Loading…
Reference in New Issue