🪦 rc-pack.sh
Script Path:
bones/scripts/rc-pack.sh
Purpose
- Bundle the
output/directory into a timestamped.tar.gzarchive and log it inbones/manifest.txt. - Export all Markdown under
home/content/into a single JSON file for AI consumption and external indexing. - Embed archive metadata (
metadata.json) directly into each tomb before compression for self-validation and ritual completeness.
CLI Interface
rc-pack.sh [--dry-run] [--verbose] [--self] [--json-only] [--help]Supported options: - --help, -h Show
usage information and exit. - --dry-run, -n
Preview actions without writing files. - --verbose,
-v Show detailed logs. - --self Include the
entire Rotkeeper project in the archive. - --json-only
Export Markdown to JSON only, skip tarball.
Workflow Steps
1. Verify Dependencies
• Check for tar, jq, and pandoc.
2. Archive Output
• Create bones/archive/tomb-YYYY-MM-DD_HHMM.tar.gz from output/ (excluding backups if --self).
2.5. Embed Metadata
• Inject a generated `metadata.json` file into each `.tar` archive before compression. This includes name, SHA256 checksum, timestamp, archive mode, and file count.
3. Export Markdown
• Use pandoc to convert .md files under home/content/ into JSON.
4. Log Operation
• Write bones/manifest.txt and bones/logs/rc-pack-YYYYMMDD-HHMMSS.log.
Exit Codes
• 0 — Archive and export completed successfully.
• 1 — Missing dependencies or I/O errors.
• 2 — No files found to process.
Examples
# Standard pack
./bones/scripts/rc-pack.sh
# Include full project in archive
./bones/scripts/rc-pack.sh --self
# JSON export only
./bones/scripts/rc-pack.sh --json-only
# Preview actions
./bones/scripts/rc-pack.sh --dry-run --verbose
# Show help
./bones/scripts/rc-pack.sh --help
# Embed metadata in default pack (done automatically)
./bones/scripts/rc-pack.sh🛣️ Navigation
• Scripts Index
• Pack Reference
• Bones Home