Add repository README with model table and per-model README with parameters and print notes. Add preview generation script and Claude commands for updating READMEs and generating previews. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.4 KiB
1.4 KiB
Update the repository README.md and individual model README files.
Steps
- Find all
.scadfiles in the repository using glob. - For each
.scadfile found: a. Read the.scadfile to extract its name and description from the header comments (lines starting with//at the top of the file). b. Determine the model directory (the parent directory of the.scadfile, relative to the repo root). c. Check if aREADME.mdexists in that model directory. If not, create one with:- The model name as heading (from the first comment line)
- The preview image (
) - A description section (from the header comments)
- A "Parameters" section listing the customizer parameters and their defaults extracted from the
.scadfile (variables with comments) - A "Print Notes" section if printing tips are found in comments
d. If the model
README.mdalready exists, update it to keep it in sync with the.scadfile header.
- Generate or update the root
README.mdwith:- A heading:
# 3D Printing Models - A brief intro line
- A markdown table with columns: Preview, Name, Description
- Preview:
<img src="{dir}/preview.png" width="200">(use HTML img tag for sizing) - Name: linked to the model directory README:
[{name}]({dir}/) - Description: short one-line description from the
.scadheader
- Preview:
- Models sorted alphabetically by directory name
- A heading: