[sword-devel] IMAGES in SWORD

Stephen Denne sword-devel@crosswire.org
Wed, 6 Mar 2002 10:36:04 +1300


> > If we change the filter to strip the basename from the url on lex/dict
> > and genbooks, then for these modules, the module authors will have to
> > add an extra directory to the url.  As it stands now, the extra
> > directory is already added for them for these 3 cases.  Does this make
> > sense?  Still hoping to hear what you think.  As said before, I think we
> > agree in principle, now just have to work out the details.
>
> I don't understand all of your comments, but let's see :)
> Let's use the Strongs dict as example:
> 	[StrongsHebrew]
> 	DataPath=./modules/lexdict/rawld/strongs/hebrew
>
> 	[StrongsGreek]
> 	DataPath=./modules/lexdict/rawld/strongs/greek
>
> They have both the same base directory. The content of this dir is:
> 	strongs/STRONGS.DOC
> 	strongs/greek.dat
> 	strongs/greek.idx
> 	strongs/hebrew.dat
> 	strongs/hebrew.idx
> 	strongs/strongs.conf
> So there are no subdirectories, which are already created (as you wrote
> above).
> If StrongsHebrew wants to add an image, <img
> src="/img_hebrew_1.png"> should
> ould refer to rawld/strongs/img_hebrew_1.png, right? If the module author
> likes subdirectories, he should create a subdir of strongs/ like
> hebrew_img/
> and then use <img src="/hebrew_img/image1.png">.
>
> This is the way which would (IMHO) not confuse module authors, because /
> refers everytime to the same, i.e. the top of the datadirectory.
>
> Is this all reasonable? I hope :)
>
> Joachim

I agree with you Joachim...

Do we want multiple modules to be able to share images common to a set of
modules when the modules have the same base directory? I think we do, so
pictures for sets of books/lexdicts/etc can be in the base directory, rather
than forcing them to be in a hebrew or greek dictionary.

So if the DataPath should always be stripped back to the last /
./modules/lexdict/rawld/strongs/greek
stripped to a base directory
./modules/lexdict/rawld/strongs/
then the image URL added (should start with a / but module
authors/converters may forget, so should be checked before removing)

On a side note, thaikjv, thai, and mlv modules are missing a trailing / but
still seem to work.

Stephen Denne.