[sword-devel] Namespace Proposal re eBible - collissions, duplication, clean-up etc

DM Smith dmsmith at crosswire.org
Thu Sep 3 11:32:52 MST 2015


I suggest folder per repository as the correct long term solution. But thinking about it, we might be able to solve it without a software change.

There are three problems to be solved:
1) data path collisions
We have a long held tradition of what the data path should be. There are two forms of the data path. One ends with a folder. The other, used for dictionaries and genbooks, ends in the prefix of the files in that folder. Our folder hierarchy is generally of the form:
./modules/{module type}/{data type}/{module name}/
or for dictionaries and genbook:
./modules/{module type}/{data type}/{module name}/{file prefix}

Where
	module_type is one of texts, comments, genbook, lexdict
	data_type is rawtext, ztext, zcom, hrefcom, rawcom, rawcom4, rawfiles, zld, rawld, rawld/devotionals, rawld/glossaries, rawld4, rawgenbook
	module_name is lower case
	file_prefix is always the module name in lower case

As discussed before, paths are case insensitive. This is necessary for Windows.

Internally, the only requirement is that dictionary/genbooks provide a folder and file prefix while all others provide just a folder.

Please note, the data path could be:
./ebible/{module name}/
or for dictionaries and genbooks
./ebible/{module name}/{module name}

That is the data path can have a name space indicator in it.

I’d highly recommend following the conventions as much as possible. Perhaps something like:
./modules/[{namespace}/]…. 
where name namespace folders are children of the modules folder and the rest follows existing convention.

2) conf collisions
The name of the module is given in the conf as an INI section name. This is important to understand. SWORD (not JSword) allows all the conf contents to be concatenated into a single file and work just as well. All the key=value pairs from one section name to the next (or end of the file for the last section) are the member entries for that section.

It is case insensitive with regard to collisions. It is currently used as the file name of the module’s conf, where the filename is in lowercase.
I’m not positive, but I think that it is merely a convention. I’m pretty sure that SWORD and JSword merely reads in all the files in the mods.d folder and/or the mods.d.tar.gz file.

If I’m right then one could rename the kjv.conf to whatever-kjv.conf and it would work just as well.

If this is the case, then the conf can have a namespace prefix.

3) This leaves the problem of collisions of module name and abbreviation.

We’ve discussed this enough. I don’t really have anything more to add. It actually has been a problem for some time, where modules in beta duplicate what’s in the main repo.

In Him,
	DM

> On Sep 3, 2015, at 10:14 AM, Greg Hellings <greg.hellings at gmail.com> wrote:
> 
> The former - installing from each repository into a different folder.
> Does it require changes to front-ends? Yes, unless we push that
> behavior into the default construction of an SWMgr. Does that mean we
> should discount it in its entirety? I don't believe so.
> 
> The path to it is not the simplest, but I do believe it leaves us in a
> desirable position.
> 
> --Greg
> 
> On Thu, Sep 3, 2015 at 9:10 AM, Peter von Kaehne <refdoc at gmx.net> wrote:
>> On Thu, 2015-09-03 at 08:54 -0500, Greg Hellings wrote:
>>> This is a proposal I've brought up multiple times in the past ...
>> 
>>> On Thu, Sep 3, 2015 at 8:08 AM, DM Smith <dmsmith at crosswire.org>
>>> wrote:
>>>> If we had each repository downloaded to its own folder,
>>>> 
>>>>> On Sep 3, 2015, at 5:26 AM, Peter von Kaehne <refdoc at gmx.net>
>>>>> wrote:
>>>>> Proposal:
>>>>> 
>>>>> 1) Add a namespace element to ModuleName and datapath. In
>> 
>> Greg, just for clarity - which of the two proposals are you endorsing?
>> 
>> Former, which DM discounts himself would require changes in the
>> software, latter would make changes interesting and compelling in terms
>> of Abbreviation support, but not necessitate anything.
>> 
>> Peter
>> 
>> _______________________________________________
>> 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
> 
> _______________________________________________
> 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