[sword-devel] IMP format and imp2vs.exe

DM Smith dmsmith at crosswire.org
Thu Feb 4 03:37:29 MST 2016


Reading the code, it calls FileMgr::getLine, which is part of the SWORD library that defines what is a line.

getLine does the following in order:
1) get line ending with a LF.
2) trims CR, space and tab from the start of a line.
3) trims LF, CR, space and tab from the end of the line.
4) If the trimmed line ends with a \, the continuation character, trim it and get more, going to 1).

So I think, your lines need the trailing space to be protected by \.

If that is what is needed, then “any number of content lines” needs to be described better.

In Him,
	DM

> On Feb 4, 2016, at 4:17 AM, David Haslam <dfhmch at googlemail.com> wrote:
> 
> According to our wiki page on file format, IMP format is
> 
> "Each entry consists of a key line and any number of content lines."
> 
> Yesterday, I observed what might be a buggy behaviour while using imp2vs.exe
> to build a module.
> 
> The IMP file I have currently has Unix style EOLs (LF) rather than Windows
> style (CRLF).
> 
> The module thus built joined the last word of content line N to the first
> word of line N+1 (under the same key).  
> 
> It ought to have inserted a space!
> 
> Even stranger - adding a space at the end of each content line did not fix
> the issue.
> 
> I'm now wondering if the Win32 version of this utility expects all source
> text files to have Windows style EOLs. 
> 
> My next step in testing will be to see if I can get the correct result after
> I convert the EOLs in the source text file.
> 
> The thing is this. I have recollections of successful builds in the past
> with multiline content for each key.  i.e. Even from a "word per line" kind
> of format for each verse.
> 
> I was using imp2vs.exe that comes bundled with Xiphos.
> === imp2vs (Revision $Rev: 2234 $) SWORD Bible/Commentary importer.
> (That's the same version as I last downloaded from Greg's Win32 compile of
> sword utilities.)
> 
> Watch this space. (Pun not really intended?)
> 
> 
> Best regards,
> 
> David
> 
> 
> 
> --
> View this message in context: http://sword-dev.350566.n4.nabble.com/IMP-format-and-imp2vs-exe-tp4655960.html
> Sent from the SWORD Dev mailing list archive at Nabble.com.
> 
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list