schierlm / BibleMultiConverter

Converter written in Java to convert between different Bible program formats
Other
124 stars 33 forks source link

Unclear from usage output what `[ExportArgs...]` are #13

Closed n9yty closed 6 years ago

n9yty commented 6 years ago

Sorry, failure on my part. :(

schierlm commented 6 years ago

No problem. Add an output file name and it should work :)

renehamburger commented 6 years ago

I made the same mistake. It would be good to add this to the command line help: java -jar BibleMultiConverter.jar <ImportFormat> <ImportFile> <ExportFormat> [<ExportArgs>...].

schierlm commented 6 years ago

What exactly to add here? That exact line is part of the output of java -jar BibleMultiConverter.jar.

Also feel free to open a pull request :)

renehamburger commented 6 years ago

Yes, sorry, that wasn't very clear what I wrote there. That's the exact line from your command line help, but it does not mention <ExportFile>. It seems that a more complete command description would be java -jar BibleMultiConverter.jar <ImportFormat> <ImportFile> <ExportFormat> <ExportFile> [<ExportArgs>...] It's also not clear what the optional <ExportArgs> are. Are they documented anywhere outside the sources?

schierlm commented 6 years ago

Export args are shown when you call

java -jar BibleMultiConverter.jar help <ExportFormat>

Some formats don't have an export file, but an export directory, or two export files, or some extra mandatory parameters (to choose how to export it) - see for example #15

Will try to put this information at the top of the output (so that it is not that far away from the Usage line).

renehamburger commented 6 years ago

Thanks for the clarification, @schierlm! I can imagine a lot of people will stumble over this. Especially as [<ExportArgs>...] are presented as optional arguments.

When you touch that part of the code the next time, maybe add an error message for missing output file (or any required ExportArgs). The uncaught Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException doesn't point the user into the right direction.