0 votes
I need to convert a USX file to USFM. I can see an option Paratext to do the reverse, but I don't see one for USX to USFM. I need to do this because Proskomma (used in Scripture App Builder for building PWAs) is rejecting 12 books of the Bible for not being in standard format. I'm hoping that converting them to USFM will make it easier for Proskomma to handle them.
Paratext by (109 points)

2 Answers

+2 votes
Best answer

Paratext can import a USX file into an existing project using Project > Manage books > Import book(s). That would change the USX into USFM saved in the project.

by [Expert]
(16.6k points)

selected by
Brilliant! I hadn't realized that conversion was happening in the background. I now have beautiful USFM files. Thank you so much!
0 votes

I think usfmtc will do that for you. (https://github.com/usfm-bible/usfmtc, or pip install usfmtc)

I just tested it with a script like the below, and it seems to work. I'm guessing that it will be better than Proskomma, but it's still going to assume your USX file is exactly what the USFM standarizations committee considers "correct" USX.

import usfmtc

input_file = "input.usx"   # Change to your USX file path
output_file = "output.sfm" # Change to your desired SFM output path

doc = usfmtc.readFile(input_file)
doc.canonicalise()
doc.saveAs(output_file, outformat="usfm")

by (1.9k points)

Related questions

+1 vote
6 answers
Paratext Aug 30, 2018 asked by mnjames (1.9k points)
0 votes
2 answers
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.
1 John 1:7
3,032 questions
5,987 answers
5,653 comments
2,019 users