Introduce - SECTOR TW - Updated with 10x10 UMap's TWs

This commit is contained in:
fred 2023-10-18 00:36:03 +02:00
parent eddae0c7c9
commit 1051fabf20
2 changed files with 27 additions and 14 deletions

View File

@ -57,26 +57,39 @@ echo "<meta http-equiv=\"refresh\" content=\"0; url='${SECTORSATGEN}'\" />" > ~/
ipfs get -o ~/.zen/tmp/${MOATS}/${SECTOR}/ /ipns/${SECTORNS}/
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
RSSNODE=($(ls ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${SLAT}*_${SLON}*/RSS/*.rss.json 2>/dev/null))
for RSS in ${RSSNODE[@]}; do
echo ${RSS}
done
NL=${#RSSNODE[@]}
RSSWARM=($(ls ~/.zen/tmp/swarm/*/UPLANET/_${SLAT}*_${SLON}*/RSS/*.rss.json 2>/dev/null))
for RSS in ${RSSWARM[@]}; do
echo ${RSS}
done
NS=${#RSSWARM[@]}
TOTL=$((${NL}+${NS}))
## INIT TW WITH TEMPLATE
[[ ! -d ~/.zen/tmp/${MOATS}/${SECTOR}/TW ]] \
&& mkdir ~/.zen/tmp/${MOATS}/${SECTOR}/TW \
&& cp ${MY_PATH}/../templates/minimal.html ~/.zen/tmp/${MOATS}/${SECTOR}/TW/index.html
## GET ALL RSS json's AND Feed SECTOR TW with it
## TODO Make function to CONTROL Tiddlers with same Title from different WT and detect conflict.
RSSNODE=($(ls ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${SLAT}*_${SLON}*/RSS/*.rss.json 2>/dev/null))
NL=${#RSSNODE[@]}
for RSS in ${RSSNODE[@]}; do
${MY_PATH}/../tools/RSS2UPlanetTW.sh "${RSS}" "${SECTOR}" "${MOATS}"
done
RSSWARM=($(ls ~/.zen/tmp/swarm/*/UPLANET/_${SLAT}*_${SLON}*/RSS/*.rss.json 2>/dev/null))
NS=${#RSSWARM[@]}
for RSS in ${RSSWARM[@]}; do
${MY_PATH}/../tools/RSS2UPlanetTW.sh "${RSS}" "${SECTOR}" "${MOATS}"
done
TOTL=$((${NL}+${NS}))
echo "Number of RSS : "${TOTL}
echo ${TOTL} > ~/.zen/tmp/${MOATS}/${SECTOR}/N_RSS
IPFSPOP=$(ipfs add -q ~/.zen/tmp/${MOATS}/${SECTOR}/N_RSS)
IPFSPOP=$(ipfs add -rwq ~/.zen/tmp/${MOATS}/${SECTOR}/* | tail -n 1)
ipfs name publish -k ${SECTORG1PUB} /ipfs/${IPFSPOP}

View File

@ -140,7 +140,7 @@ mkdir ~/.zen/tmp/${MOATS}
cp ~/.zen/tmp/${IPFSNODEID}/UPLANET/_${LAT}_${LON}/RSS/*.rss.json ~/.zen/tmp/${MOATS}/${UMAP}/RSS/
RSSFILES=($(ls ~/.zen/tmp/swarm/*/UPLANET/_${LAT}_${LON}/RSS/*.rss.json 2>/dev/null))
for RSSFILE in ${RSSFILES[@]}; do
cp -v ${RSSFILE} ~/.zen/tmp/${MOATS}/${UMAP}/RSS/
cp ${RSSFILE} ~/.zen/tmp/${MOATS}/${UMAP}/RSS/
done
## COLLECT TW LINKS FOR SWARM
@ -149,7 +149,7 @@ mkdir ~/.zen/tmp/${MOATS}
for TWRED in ${TWFILES[@]}; do
ZMAIL=$(echo ${TWRED} | rev | cut -d '/' -f 2 | rev)
mkdir -p ~/.zen/tmp/${MOATS}/${UMAP}/TW/${ZMAIL}
cp -v ${TWRED} ~/.zen/tmp/${MOATS}/${UMAP}/TW/${ZMAIL}/
cp ${TWRED} ~/.zen/tmp/${MOATS}/${UMAP}/TW/${ZMAIL}/
done