Re: OSIS and intros

DM Smith <[email protected]> Wed, 9 Jul 2025 12:38:39 -0400
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
--===============5872414390602633895==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_6E3EFA52-695D-45C1-8810-16FEF0E34590"


--Apple-Mail=_6E3EFA52-695D-45C1-8810-16FEF0E34590
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On Jul 9, 2025, at 10:35=E2=80=AFAM, Karl Kleinpaste =
<[email protected]> wrote:
>=20
> On 7/9/25 10:01 AM, DM Smith wrote:
>> These have to be enable with setIntros(true). I=E2=80=99m not sure =
which frontends support these intros.
>=20
> Xiphos does, but for only book and chapter, obtained as 0:0 and =
[1-n]:0.
>=20
> It has no awareness of module or testament intros. How are these =
accessed in terms of a verse key? B & C are obvious as "0" elements, but =
where do the other intro elements fit? Visually, should a testament =
intro be presented ahead of Genesis and Matthew, or should separate =
views be provided?

I think you can either parse the string literals I gave earlier, e.g. =
=E2=80=9C[ Module Heading ]=E2=80=9D, =E2=80=9C[ Testament 1 Heading =
]=E2=80=9D, =E2=80=9C[ Testament 2 Heading ]"or set the testament to 0, =
1 or 2. Setting the testament will set the other parts to 0 if Intros is =
true else 1.

Something like the following should work to get the headings.
VerseKey vk;
vk.setIntros(true);
vk.setTestament(0); // for module heading. use 1 for OT Heading and 2 =
for NT heading.

or
VerseKey vk;
vk.setIntros(true);
ListKey verses =3D vk.parseVerseList(=E2=80=9C[ Module Heading ]=E2=80=9D,=
 vk, true); // or =E2=80=9C[ Testament 1 Heading ]=E2=80=9D, =E2=80=9C[ =
Testament 2 Heading ]=E2=80=9D
verses.setPosition(TOP);
vk =3D verseKeys;

Currently in OSIS modules, we are storing the build info in a milestone =
which SWORD won=E2=80=99t render. It is stored in the NT Heading when =
the module is NT only, and in the OT Heading otherwise.

As far as I can tell there=E2=80=99s no test to see if a module has =
these intros. I would think from a front end perspective you=E2=80=99d =
want to show them only if the user has chosen to show =
intros/headings/titles and only if they have content.

It might make sense to show them when showing Book intros to Gen or =
Matt. I=E2=80=99m not sure what you=E2=80=99d do if the module was the =
NT and Psalms. Perhaps, an upfront test to determine whether the module =
has these intros and show them separately.



=E2=80=94 DM


> _______________________________________________
> sword-devel mailing list: [email protected]
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page


--Apple-Mail=_6E3EFA52-695D-45C1-8810-16FEF0E34590
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><br =
id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote =
type=3D"cite"><div>On Jul 9, 2025, at 10:35=E2=80=AFAM, Karl Kleinpaste =
&lt;[email protected]&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div>

 =20
    <meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3DUTF-8">
 =20
  <div>
    <div class=3D"moz-cite-prefix">On 7/9/25 10:01 AM, DM Smith =
wrote:<br>
    </div>
    <blockquote type=3D"cite" =
cite=3D"mid:F44B9ADB-3A16-47EF-9FDD-F251614F3844-ZKNsLcePPwPNLxjTenLetw@public.gmane.org">
      <pre class=3D"moz-quote-pre" wrap=3D"">These have to be enable =
with setIntros(true). I=E2=80=99m not sure which frontends support these =
intros.</pre>
    </blockquote>
    <br>
    <font face=3D"FreeSerif">Xiphos does, but for only book and chapter,
      obtained as 0:0 and [1-n]:0.<br>
      <br>
      It has no awareness of module or testament intros. How are these
      accessed in terms of a verse key? B &amp; C are obvious as "0"
      elements, but where do the other intro elements fit? Visually,
      should a testament intro be presented ahead of Genesis and
      Matthew, or should separate views be =
provided?</font><br></div></div></blockquote><div><br></div>I think you =
can either parse the string literals I gave earlier, e.g. =E2=80=9C[ =
Module Heading ]=E2=80=9D, =E2=80=9C[ Testament 1 Heading ]=E2=80=9D, =
=E2=80=9C[ Testament 2 Heading ]"or set the testament to 0, 1 or 2. =
Setting the testament will set the other parts to 0 if Intros is true =
else 1.</div><div><br></div><div>Something like the following should =
work to get the headings.</div><div>VerseKey =
vk;</div><div>vk.setIntros(true);</div><div>vk.setTestament(0); // for =
module heading. use 1 for OT Heading and 2 for NT =
heading.</div><div><br></div><div>or</div><div>VerseKey =
vk;</div><div>vk.setIntros(true);</div><div>ListKey verses =3D =
vk.parseVerseList(=E2=80=9C[ Module Heading ]=E2=80=9D, vk, true); // or =
=E2=80=9C[ Testament 1 Heading ]=E2=80=9D, =E2=80=9C[ Testament 2 =
Heading ]=E2=80=9D</div><div>verses.setPosition(TOP);</div><div>vk =3D =
verseKeys;</div><div><br></div><div>Currently in OSIS modules, we are =
storing the build info in a milestone which SWORD won=E2=80=99t render. =
It is stored in the NT Heading when the module is NT only, and in the OT =
Heading otherwise.</div><div><br></div><div>As far as I can tell =
there=E2=80=99s no test to see if a module has these intros. I would =
think from a front end perspective you=E2=80=99d want to show them only =
if the user has chosen to show intros/headings/titles and only if they =
have content.</div><div><br></div><div>It might make sense to show them =
when showing Book intros to Gen or Matt. I=E2=80=99m not sure what =
you=E2=80=99d do if the module was the NT and Psalms. Perhaps, an =
upfront test to determine whether the module has these intros and show =
them =
separately.</div><div><br></div><div><br></div><div><br></div><div>=E2=80=94=
 DM</div><div><br></div><div><br><blockquote type=3D"cite"><div><div>
  </div>

_______________________________________________<br>sword-devel mailing =
list: =
[email protected]<br>http://crosswire.org/mailman/listinfo/sword-d=
evel<br>Instructions to unsubscribe/change your settings at above =
page<br></div></blockquote></div><br></body></html>=

--Apple-Mail=_6E3EFA52-695D-45C1-8810-16FEF0E34590--

--===============5872414390602633895==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

--===============5872414390602633895==--