#!/bin/sh # Extract some content from statuses for i in "$main_basedir"/statuses/*/*.json; do content=$(jj -i $i content | "$main_basedir"/utils/html_to_txt_render) status_id=$(jj -i $i 'id') status_date=$(jj -i $i 'created_at') touch -d "$status_date" "$main_basedir"/statuses/$status_id jj -i $i content | "$main_basedir"/utils/html_to_txt_render > "$main_basedir"/statuses/$status_id/content chmod 600 "$main_basedir"/statuses/$status_id/content done