On 30/12/14 08:47, Peter Von Kaehne wrote:
As it stands - and I guess apart from David and Chris I am probably one of the most prolific users of this and the last, Perl based script, the occasions where I ended up in a crash are few and far in between. Much more often bad USFM produces bad OSIS, non validating OSIS, rather than crashes.
Yes, correct, that was my point exactly, except to note (as shown in other recent threads), there's plenty of "bad" OSIS that actually validates and gets through into modules. usfm2osis.py doesn't crash because it doesn't even detect many issues. The only error message in the entire program is to list unhandled USFM markers. Unlike Greg, it seems, my philosophy would definitely be to try to discover "issues" and advise the module builder, rather than have the issues carry through further to the next stage (which is the actual modules). What USFM verification tool does the module maker run before using usfm2osis.py?
 
BTW - Robert, you did make a bug report re a crash and I would like to process this - could you please add to the comments of ModTools 46 a test case?
 
Right, although to be clear, I wasn't talking at all about crashes in my email below. And sorry, it's too long ago now so might as well just close the bug report. I was unable to easily discover the bad line in the USFM (because of my point #2 below) and wasn't able to pursue tracking it down at the time. I think I submitted the bug report before understanding that it was the philosophy of usfm2osis.py to not attempt to detect issues in the USFM. I know better now. :)

Robert.
Gesendet: Montag, 29. Dezember 2014 um 19:35 Uhr
Von: "Greg Hellings" <greg.helli...@gmail.com>

If you provide undefined/invalid input then the behavior of a convenience script being undefined should be no surprise. It is not the place of this script to be a USFM verification tool.

On Dec 29, 2014 2:28 PM, "Robert Hunt" <hunt.robe...@gmail.com> wrote:
On 30/12/14 06:29, Peter von Kaehne wrote:
It is very well written and neatly done and does its job with near
perfection. I would welcome contributions to it, as long as they are
equally well done. 
Just for your info: usfm2osis.py basically treats each USFM book as a huge hunk of text to which it does a large number of global text substitutions. Although this, in fact, does make it a very neat and tidy program, I don't think it's nearly perfect. The main disadvantage of using this method can be expressed as two results to the user (and I think these are quite serious defects in terms of reliable module making as other threads attest):
  1. Certain errors or non-conformities in the USFM are not even detected (e.g., when \d is used as a paragraph type marker with verses logically "inside" the \d marker which is not actually documented [nor banned] in the USFM specification)
     
  2. If there is an error, the program is completely unable to give the user any indication of where (e.g., line number or chapter/verse) the error occurs because it has absolutely no concept of "position within the file".

Perhaps this is accounted for by running some other program first to thoroughly check that the formation of the USFM is within the expected/programmed range???



_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to