Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import and Export USFM / USFX / USX #15

Closed
jamescmarsh opened this issue Dec 12, 2017 · 4 comments
Closed

Import and Export USFM / USFX / USX #15

jamescmarsh opened this issue Dec 12, 2017 · 4 comments
Milestone

Comments

@jamescmarsh
Copy link

I specifically am interested in converting MyBibleZone files to USFM or something similar, like USFX or USX.

schierlm added a commit that referenced this issue Mar 28, 2018
This is probably the most requested feature.

Note that this importer has only been tested on very few bibles, so it
may still contain lots of bugs. Also note that some tags (\ca \cp \va
\vp \fig and \fm) are deliberately not supported (they are not supported
by any of the other formats either), and Study Bible tags are also
missing (but might be added later).

USFX and USX will come in a later commit (I have already started it but
did not want to force USFM to wait for the missing parts in these two
less requested formats).

Fixes #15.
@schierlm
Copy link
Owner

Have a look at the current implementation if it suffices your needs. In case you need more / anything else, feel free to reopen.

@schierlm schierlm added this to the v0.0.6 milestone Mar 28, 2018
@AlisterH
Copy link

AlisterH commented May 6, 2018

Hi, how do you actually export to USFM? For other formats you add an output filename to the end of the command to avoid the error message as per #13, but I can't work out what to do for usfm.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1

@schierlm
Copy link
Owner

schierlm commented May 6, 2018

There are other formats that need more than one output parameter. That's what the help command is for.

C:\BibleMultiConverter-0.0.6>java -jar BibleMultiConverter-AllInOneEdition.jar help USFM
USFM - Bible format used by Paratext

Bible format used by Paratext

Usage (export): USFM <outdir> <filenamepattern>

Point the importer to a directory that contains the .usfm files.

When exporting, you need to give a file name pattern. You can use # for
the book number and * for the book name.

In other words, enter the name of a (nonexisting or empty) directory as first parameter, and the desired filename pattern (e.g. #-*.usfm) as second one.

@shadow-light
Copy link

Thanks for this great tool. I was also confused by the traceback from missing an arg since it wasn't clear what the problem was. I thought it was an issue parsing the file. Perhaps the exception can be caught and "Argument missing" or something printed instead?

WARNING: Skipping unknown tag \fig
WARNING: Skipping unknown end tag \fig*
WARNING: Skipping mismatched end tag \fig*
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at biblemulticonverter.format.paratext.AbstractParatextFormat.doExportBooks(AbstractParatextFormat.java:430)
        at biblemulticonverter.tools.ParatextConverter.run(ParatextConverter.java:41)
        at biblemulticonverter.Main.main(Main.java:58)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants