πŸ“š Docs Fix Task

πŸ“‘ Table of Contents

A concise overview of what rc-docs-fix.sh does in the Rotkeeper toolkit, providing automated insertion of standard sections into Markdown docs.


πŸ“ Overview

Requirements: Bash 4+, GNU or BSD sed, standard Unix utilities (grep, find, mkdir, cp).

The rc-docs-fix.sh utility audits and patches Markdown files by inserting stub sections for Purpose, Usage, Examples, Troubleshooting, and Future Plans if they are missing. Inputs: Target directory path (default: home/content/docs/). Outputs: Updated Markdown files with inserted section stubs and corresponding backups.


πŸš€ Usage

rc-docs-fix.sh [OPTIONS] [DIR]

Options:

Examples

Generating stubs in the default docs folder:

./bones/scripts/rc-docs-fix.sh

Targeting a specific directory:

./bones/scripts/rc-docs-fix.sh bones/archive

Display help:

rc-docs-fix --help

πŸ” Details

Upon invocation, the utility: 1. Parses flags, resolves the target directory, and confirms write access. - e.g., rc-docs-fix bones/archive 2. Detects the appropriate sed in-place flag for the host environment. 3. Creates a timestamped backup directory under the target. - Creates bones/archive/.rc-docs-backups-20250515123045/filename.md 4. Iterates over each .md file, backing it up and inserting missing stub sections. 5. Reports the files modified and backups created. - Summary printed to stdout, listing each file processed and backup location.



πŸ› οΈ Troubleshooting


🎨 Sora Prompts

"An ancient archivist ghost, crafting stub sections in glowing Markdown crypts under flickering candlelight"
"A nameless scribe’s quill moving across digital parchment, leaving behind structured stubs of purpose and usage"

Author:

Project: Rotkeeper

Version: 0.2.3-pre

License: