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.
For just as each of us has one body with many members, and these members do not all have the same function, so in Christ we, though many, form one body, and each member belongs to all the others.
Romans 12:4-5
3,036 questions
5,992 answers
5,659 comments
2,021 users