Add a utility to facilitate the fixing of SFM files.
@davidbaines is already working on this.
Since Jan 8, 2026.
- Dominant language
- Python
- Stars
- 39
- Forks
- 7
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Description
When translating a book and the source SFM file fails to parse only the first error in the file is reported.
It would be very helpful to have a utility that would simply find all the errors in the file and report them with the file name and line number. The engineer in the loop could run that in VScode and click on each error to jump to it and fix it.
The bulk of the code required already exists in the SFM folder. init.py and usfm.py.
There could be an option to automatically fix a number of issues.
When the code detects that there is a missing space after a verse number a space could be inserted.
When a marker that is only valid at the beginning of the line is found inline a newline could be inserted before it.
When text is found after a chapter marker (or any other marker that doesn't accept text) the text could be moved to a remark (\rem ) on the next line.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.