At many MAST events it is necessary to print from USFM so that the translators can
- work from a paper copy of the ULB
- view work done in Autographa or V-MAST
While both Autographa Lite and V-MAST have the ability to export HTML, there are some lacks in the output. For example, neither makes provision for footnotes, and neither incorporates the translated names for the Bible books and chapters.
The attached python script, usfm2html.py, requires Python 3 to run, but otherwise should be able to be used on Windows, Mac, and Linux computers.
If using bash, you can convert a whole folder of USFM files with
for i in $(ls); do usfm2html $i; done
This updated version deals with file naming and USFM usage from the Bahasa Indonesia USFM, and is intended to be turned into PDF using
html2ps -n <filename>.html | ps2pdf - <filename>.pdf
for i in $(ls *.html); do html2ps -n "$i" | ps2pdf - "${i/.html/.pdf}"; done
Hi John,
I found this tool that goes from USFM to XMl. https://ebible.org/wordsend/ What do you think?
Hi Justin,
I looked at it, but since I don't primarily use Windows, and it's only available under Windows, I haven't explored it.
It might also be worth noting that this script is available at https://github.com/mondele/usfm2html
There's an update to this script now available on github. Previously, the superscripted footnotes and verse numbers did not render as superscripts in LibreOffice, if the HTML was opened directly in that program. The new version changes the HTML to render properly, so we can now easily move on to things like two-column, full adjusted printing with double-spacing — this was more difficult previously.
One of the issues that we run into when we're asked to print the ULB Scriptures (or to help someone print the ULB) is the question of which ULB we want to print. I'm attaching a diff file — if you have a decent programmer's text editor it will display the difference information with colors — that shows the difference between the ULB as present in the most recently updated translationStudio and the one that is displayed on Bible In Every Language.
Most of the changes are pretty minor. Many of them are more understandable in the translationStudio ULB (Adam slept with his wife vs. Adam knew his wife). Sometimes it's just an added space at the end of a line.
However, my point is to let us know that someone needs to make the decision as to which version is to be preferred, and to what degree. I suppose we could also make both available as "Here is the BIEL version, and here is the translationStudio version", and let the downloader decide.
In any case, I suggest that once we have made that decision, someone in TA should make a copy (I will volunteer to do it with my script) that is printable, and a couple of format stylesheets to, for example, print it in two columns, or to print with a new page for every chapter.
We've had enough requests for this, I've uploaded the Bible in ODT format (Open Document Text ̣⨪ it is the native word processing format for LibreOffice, and MS Office can use it.) There are three zip files, for the whole Bible, the New Testament, and the Old Testament. You can get them here: https://git.door43.org/Tech_Advance/ULB-For-Printing/src/branch/master/
I intend to add formatting documents (stylesheets) at a later time.
The ULB text used is the most recent version from translationStudio.