Skip to content

feat: speak file:line refs as "line N of file"#44

Merged
StuBehan merged 1 commit into
mainfrom
feat/spoken-file-refs
Jul 17, 2026
Merged

feat: speak file:line refs as "line N of file"#44
StuBehan merged 1 commit into
mainfrom
feat/spoken-file-refs

Conversation

@StuBehan

Copy link
Copy Markdown
Collaborator

Summary

Folds a file:line-reference rule into the existing dev_terms normalization pass. engine.py:42 was reaching espeak raw and voicing as "dot py colon forty two"; spoken, the line number is the signal and the filename is noise, so it's re-ordered to lead with the line.

Changes

  • foo.ts:666"line 666 of foo ts" — basename only (directories dropped; "src/" reads as "slash"), dotted name voiced word by word.
  • Ranges and columns: cli.py:100-118 → "lines 100 to 118 of cli py"; foo.ts:666:10 → "line 666, column 10 of foo ts".
  • Triggered by the :line suffix, so times, ratios, verses, and dotted versions (12:30, 3:1, John 3:16, 1.2.3) are left untouched.
  • Runs early (before the number/version/unit stages and the dev-term dict), gated on dev_terms (default on) — no new flag.

Testing

  • 8 new tests/test_text.py cases (basename/range/column, and the untouched times/ratios/versions).
  • ruff check + ruff format --check clean; mypy clean; pytest — 203 passed.

CHANGELOG.md intentionally untouched — release-please owns it; this lands as a feat in the next release.

@StuBehan
StuBehan force-pushed the feat/spoken-file-refs branch from ba25106 to 616002e Compare July 17, 2026 14:52
@StuBehan
StuBehan merged commit 7ba043b into main Jul 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant