0 votes
47 views
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) | 47 views

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.7k 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 821 views
Does anyone know of a command line tool to convert USFM format to USX (or any other xml flavor)? I'd like to write a ... 's the best option I can try to figure out what's wrong.
mnjames 1.9k asked Aug 30, 2018
0 votes
4 answers 620 views
We have a historical NT (from 1542) with extensive comments in footnotes to help modern readres to handle it. Is ... in USFM files, too? Any help would be appreciated, anon982572
Seppo Sipilä 250 asked Jun 7, 2016
0 votes
6 answers 509 views
I want to show our committee every verse that has the Hebrew word chesed to help them think through (1) how the ... reference list and then convert it to a project reference list?
viverechristus 296 asked Sep 23, 2021
0 votes
1 answer 429 views
I would like to export the project to HTML so that I can share drafts with people. I don't want to export to PDF, ... forth. How do I hide the USFM markers from the exported HTML?
bit 495 asked Apr 14, 2022
0 votes
2 answers 367 views
Hello, I am writing as a representative of a small task team assigned to review proposals for what becomes a ... necessary information with you. Thank you. jmkla [Email Removed]
[Expert]
jmkla
290
asked Oct 2, 2015
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
I appeal to you, brothers and sisters, in the name of our Lord Jesus Christ, that all of you agree with one another in what you say and that there be no divisions among you, but that you be perfectly united in mind and thought.
1 Corinthians 1:10
3,047 questions
6,007 answers
5,672 comments
2,027 users