YAML Description Period Manager
One script. Five modes. All problems solved.Quick Start
Examples
Modes Explained
| Mode | Purpose | Makes Changes? |
|---|---|---|
check | Show what needs fixing | No - read only |
fix | Add missing periods to descriptions | Yes |
clean | Remove incorrect periods | Yes |
restore | Fix list items (backticks & periods) | Yes |
blanks | Remove extra blank lines | Yes |
Typical Workflow
What It Does
fix mode adds periods to:
clean mode removes incorrect periods from:
restore mode fixes list items:
blanks mode removes extra lines:
Safety Features
- ✅ Built-in verification prevents corrupting files
- ✅
checkmode shows what will change (without changing) - ✅ Only modifies description fields (never $ref, example, type, etc.)
- ✅ Handles single-line and multi-line descriptions
- ✅ Works with quoted and unquoted text
- ✅ Preserves code formatting (backticks)
Batch Processing
Why This Script?
This script was created to solve a common problem:- Many YAML description fields are missing periods
- Bulk find/replace accidentally modifies non-description fields
- YAML breaks with periods in
$ref,example,type, etc. - Manual fixes are time-consuming and error-prone
Requirements
- Python 3.6+
- No external dependencies