[sword-devel] Publishing User Content

Troy A. Griffitts scribe at crosswire.org
Fri Nov 5 11:06:03 MST 2010


SWConfig::operator +=

In BibleCS we store our font preferences in something like:


The file looks something like:

Font=Time New Roman


Then we basically do

SWConfig userPrefs("./userprefs.conf");
(*swMgr->config) += userPrefs;

So, we could just as easily add CipherKey= lines in ./userprefs.conf

The trick is we need to augment the SWMgr config AFTER the config is
loaded and BEFORE SWMgr creates the SWModule object, so the cipherkey is
used during module construction.

Not sure exactly where to place it.  I'll try to remember to look for a
good place and repost.

On 11/05/2010 04:35 PM, DM Smith wrote:
> On 11/05/2010 12:15 PM, Karl Kleinpaste wrote:
>> The particular problem for how to store and use crypt keys outside of
>> their ("natural"?) xyz.conf will need to be addressed.  Xiphos stores
>> them that way, and I thought most apps did so, but I suppose we should
>> see what code from BibleTime we could borrow so that keys don't need to
>> remain stored that way.
> Just a couple of thoughts:
> IIRC, multiple confs can be slurped into a multi-map. If so...
> Have a separate *.conf per module of the form:
> [NAME]
> cipher=xxxx
> Where *.conf is the same name as what is in mods.d and [NAME] matches
> that in that conf.
> Don't store it next to mods.d and modules. As grabbing ~/.sword (or
> whatever it's called and where-ever it is located) shouldn't also grab
> the keys.
> For lack of a better name have a sibling dir to ~/.sword, say ~/.cwkeys
> that holds them.
> But if not separate from ~/.sword, then in ~/.sword/keys.d?
> In Him,
>     DM
> _______________________________________________
> 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