forked from STI/Astroport.ONE
correct RSS/all.json
This commit is contained in:
parent
a8990ce2df
commit
002d9ff599
|
@ -338,9 +338,12 @@ echo "<meta http-equiv=\"refresh\" content=\"0; url='/ipfs/${ZCHAIN}' />" > ~/.z
|
||||||
data=$(jq '.' "$file")
|
data=$(jq '.' "$file")
|
||||||
json_array+=("$data")
|
json_array+=("$data")
|
||||||
done
|
done
|
||||||
# Convert the array to a single JSON object
|
temp_file=$(mktemp)
|
||||||
merged_json=$(jq -n '{"data": [ $json_array[] ]}')
|
printf '%s\n' "${json_array[@]}" > "$temp_file"
|
||||||
echo "$merged_json" > ~/.zen/tmp/${MOATS}/${UMAP}/RSS/all.json
|
# Use jq to read the array from the temporary file and create the merged JSON
|
||||||
|
jq -n --slurpfile array "$temp_file" '{"data": $array}' > ~/.zen/tmp/${MOATS}/${UMAP}/RSS/all.json
|
||||||
|
# Remove the temporary file
|
||||||
|
rm "$temp_file"
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
############################ PUBLISHING UMAP
|
############################ PUBLISHING UMAP
|
||||||
|
|
Loading…
Reference in New Issue