diff --git a/scripts/geoloc-members-json.sh b/scripts/geoloc-members-json.sh
index bf8bb8f..0f28f0f 100755
--- a/scripts/geoloc-members-json.sh
+++ b/scripts/geoloc-members-json.sh
@@ -25,14 +25,14 @@ fi
echo "[" > $FILE
for i in $DATA_MBR; do
- result=$(jaklis get -p $i)
+ result=$($JAKLIS get -p $i)
geoPoint=$(echo "$result" | jq .geoPoint 2>/dev/null)
if [[ "$geoPoint" == "null" || "$result" == "Profile vide" ]]; then
continue
else
isMbr='"isMember": true,'
- userId=$(jaklis id -p $i | jq .idty.username)
+ userId=$($JAKLIS id -p $i | jq .idty.username)
userIdFormat="\"userId\": $userId,"
resultWithMbr=$(echo "$result" | sed "s/\"geoPoint\": {/$userIdFormat $isMbr \"geoPoint\": {/g")
echo "$resultWithMbr," >> $FILE
@@ -40,7 +40,7 @@ for i in $DATA_MBR; do
done
for i in $DATA_LARF; do
- result=$(jaklis get -p $i)
+ result=$($JAKLIS get -p $i)
geoPoint=$(echo "$result" | jq .geoPoint 2>/dev/null)
if [[ "$geoPoint" == "null" || "$result" == "Profile vide" ]]; then
@@ -56,6 +56,11 @@ sed -i '$ d' $FILE
echo "}" >> $FILE
echo "]" >> $FILE
-[[ -f $FINAL_LOCATION ]] && cat $FILE | jq . > $FINAL_LOCATION
-
+finalResult=$(cat $FILE | jq .)
+RESULT=$?
+if [ $RESULT -eq 0 ]; then
+ echo "$finalResult" > $FINAL_LOCATION
+else
+ echo "Failed" >> $FILE
+fi
diff --git a/scripts/walletsBalance.sh b/scripts/walletsBalance.sh
index 6040f55..5f5c030 100755
--- a/scripts/walletsBalance.sh
+++ b/scripts/walletsBalance.sh
@@ -20,7 +20,9 @@ work() {
unset k
balance=$(echo "$jsonResult" | jq -r '.balance')
- username=$(echo "$jsonResult" | jq -r '.username')
+ [[ $balance == "null" ]] && balance="0"
+ username=$(echo "$jsonResult" | jq -r '.idty.username')
+ [[ $username == "null" ]] && username=""
formatedBalance=$(printf "%-10s | %-45s | %-1s" $balance $i $username)
if [[ $1 == "members" ]]; then
@@ -34,6 +36,7 @@ work() {
echo "$formatedBalance" | tee -a /tmp/balance-g1.txt
totalBalance="$totalBalance"$'\n'"$formatedBalance"
+ echo "$jsonResult" >> /home/poka/debugJsonForbes.log
# For tests only
# [[ $i == "13fn6X3XWVgshHTgS8beZMo9XiyScx6MB6yPsBB5ZBia" ]] && break
diff --git a/tpl/index.html b/tpl/index.html
index ea1d498..22e9973 100644
--- a/tpl/index.html
+++ b/tpl/index.html
@@ -17,8 +17,7 @@
| Liste de tous les wallets
| Liste des wallets membres
| Liste des simples portefeuilles
- | Voir le JSON profiles membres
- | Classement FORBES |
+ | Voir le JSON profiles membres |