🪦 rc-unpack.sh
rc-unpack.sh is a planned restoration script that will
reverse the effects of rc-pack.sh. It will extract
archived tombs and restore either the rendered HTML
(/output/) or exported JSON data for rehydration or
inspection.
Status: This script is not yet implemented. It is reserved for future versions of Rotkeeper.
📂 What It Will Do
When passed a .tar.gz archive from
rc-pack.sh, this script will:
- Extract
/output/contents into your local project folder - Optionally restore logs, templates, or JSON exports
- Log its actions to
bones/logs/rc-unpack-*.log - Refuse to overwrite existing files unless
--forceis passed
🧬 Planned JSON Support
Rotkeeper may also support direct restoration from exported JSON files:
bones/archive/tomb-export-YYYY-MM-DD_HHMM.json
This would allow:
- Rebuilding
.mdfiles intohome/content/ - Inspecting or transforming JSON records without running Pandoc
🛠 Planned Usage
bash bones/scripts/rc-unpack.sh bones/archive/tomb-2025-05-27_1113.tar.gzOptional flags may include:
--to output/— Target unpack destination--json— Input is a JSON file, not a.tar.gz--dry-run— Show changes without writing files--force— Allow overwriting existing output
🔐 Safety Features
- Prompts before overwriting
output/or logs - Logs all restored files to
bones/manifest.txtandbones/logs/ - May use SHA256 or tomb signature to confirm archive lineage
📌 Related Files & Scripts
rc-pack.sh— Entombs the siterc-reseed.sh— Rehydrates full tombs from archivebones/archive/— Default folder for.tar.gzand JSON outputsbones/logs/— Whererc-unpacklogs will go when implemented