Re: [sword-devel] Where is the source code for individual SWORD modules?

2023-10-21 Thread Michael H
The source for the AKJV is at (
https://github.com/BibleCorps/ENG-B-AKJV2018-pd-PSFM/tree/master/p.sfm).

However, this is USFM not OSIS.  Someone (Peter Von Kaehne I think) took
this USFM and turned it into the module that is currently on crosswire.
Usually he has put the resulting code into a crosswire or other gitlab
location.

Note that the code is currently p.sfm. To make it purely USFM, the last 4
lines of each book that end with a tilde ~ should be removed.  These lines
are all valid USFM, but may not produce the meaning they have in p.sfm.
___
sword-devel mailing list: sword-devel@crosswire.org
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Where is the source code for individual SWORD modules?

2023-10-21 Thread Peter von Kaehne
Use diatheke, it produces a complete LaTEX document. 

You will need to define a bunch of macros , something I have never come round 
to. If you could produce something reasonable universal to shove back onto our 
server that would be ideal. 

Peter

Sent from my phone. Please forgive misspellings and weird “corrections”

> On 21 Oct 2023, at 08:28, Aaron Rainbolt  wrote:
> 
> On 10/21/23 02:20, Timothy Allen wrote:
>>> On 21/10/23 16:48, Aaron Rainbolt wrote:
>>> mod2imp claims to be able to generate LaTeX (something like `mod2imp -r 
>>> LATEX AKJV`) but at least the Ubuntu build of libsword-utils mod2imp is 
>>> broken in this regard - any time I try to use any of the filters, it tells 
>>> me "mod2imp: Unknown argument: LATEX" or something similar for every single 
>>> possible output format (OSIS, XHTML, RTF, etc.).
>> 
>> That's because it doesn't use a flexible argument parser like getopt or 
>> similar. When the help text says:
>> 
>>usage: mod2imp  [options]
>> 
>> ...it really means it, the options have to go *after* the module name, not 
>> before:
>> 
>>mod2imp -r LATEX AKJV # fails with "Unknown argument"
>> 
>>mod2imp AKJV -r LATEX # succeeds
>> 
> Oh. That explains a lot :P My brain is so used to tools expecting the last 
> argument to be the source file that I read the "" and 
> "[options]" part backwards and thought it expected the module name at the 
> end. So... lesson learned, thank you for catching my silly mistake.
> 
>> ...although in this case, the IMP markup and the LaTeX markup get a bit 
>> mixed and it's not the easiest to work with. You may have better luck with 
>> the example command-line SWORD tool, diatheke:
>> 
>>diatheke -b AKJV -f LATEX -k Genesis
>> 
> I ended up writing a small tool in C# that parsed the IMP markup and spit out 
> incomplete LaTeX code. I used Mono to run the tool under Linux, then took the 
> output and pasted it into a "skeleton" document I had written earlier. (The 
> IMP markup for the AKJV module was really simple thanks to the simplicity of 
> the module itself so it ended up being pretty easy.) If anyone's interested 
> in the end result I got, I'm happy to share it. I think it came out pretty 
> good.
> 
> Aaron
> 
>> Timothy
>> 
>> 
>> ___
>> sword-devel mailing list: sword-devel@crosswire.org
>> http://crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

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


Re: [sword-devel] Where is the source code for individual SWORD modules?

2023-10-21 Thread Aaron Rainbolt

On 10/21/23 02:20, Timothy Allen wrote:

On 21/10/23 16:48, Aaron Rainbolt wrote:
mod2imp claims to be able to generate LaTeX (something like `mod2imp 
-r LATEX AKJV`) but at least the Ubuntu build of libsword-utils 
mod2imp is broken in this regard - any time I try to use any of the 
filters, it tells me "mod2imp: Unknown argument: LATEX" or something 
similar for every single possible output format (OSIS, XHTML, RTF, etc.).


That's because it doesn't use a flexible argument parser like getopt 
or similar. When the help text says:


usage: mod2imp  [options]

...it really means it, the options have to go *after* the module name, 
not before:


mod2imp -r LATEX AKJV # fails with "Unknown argument"

mod2imp AKJV -r LATEX # succeeds

Oh. That explains a lot :P My brain is so used to tools expecting the 
last argument to be the source file that I read the "" and 
"[options]" part backwards and thought it expected the module name at 
the end. So... lesson learned, thank you for catching my silly mistake.


...although in this case, the IMP markup and the LaTeX markup get a 
bit mixed and it's not the easiest to work with. You may have better 
luck with the example command-line SWORD tool, diatheke:


diatheke -b AKJV -f LATEX -k Genesis

I ended up writing a small tool in C# that parsed the IMP markup and 
spit out incomplete LaTeX code. I used Mono to run the tool under Linux, 
then took the output and pasted it into a "skeleton" document I had 
written earlier. (The IMP markup for the AKJV module was really simple 
thanks to the simplicity of the module itself so it ended up being 
pretty easy.) If anyone's interested in the end result I got, I'm happy 
to share it. I think it came out pretty good.


Aaron


Timothy


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

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


Re: [sword-devel] Where is the source code for individual SWORD modules?

2023-10-21 Thread Timothy Allen

On 21/10/23 16:48, Aaron Rainbolt wrote:
mod2imp claims to be able to generate LaTeX (something like `mod2imp 
-r LATEX AKJV`) but at least the Ubuntu build of libsword-utils 
mod2imp is broken in this regard - any time I try to use any of the 
filters, it tells me "mod2imp: Unknown argument: LATEX" or something 
similar for every single possible output format (OSIS, XHTML, RTF, etc.).


That's because it doesn't use a flexible argument parser like getopt or 
similar. When the help text says:


   usage: mod2imp  [options]

...it really means it, the options have to go *after* the module name, 
not before:


   mod2imp -r LATEX AKJV # fails with "Unknown argument"

   mod2imp AKJV -r LATEX # succeeds

...although in this case, the IMP markup and the LaTeX markup get a bit 
mixed and it's not the easiest to work with. You may have better luck 
with the example command-line SWORD tool, diatheke:


   diatheke -b AKJV -f LATEX -k Genesis


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