Re: Where is the source code for individual SWORD modules?
Aaron Rainbolt <[email protected]>
| Newsgroups | gmane.comp.literature.sword.devel |
|---|---|
| Message-ID | <[email protected]> |
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 <module_name> [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 "<module_name>" 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: [email protected] > http://crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page _______________________________________________ sword-devel mailing list: [email protected] http://crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page