Hi,

Using the SWORD API, is there an easy way to determine the remote/source repository a module is coming from?

I haven't found anything in the SWModule class or anywhere else.

This would be my approach without any API method:
1) Get the config entry "PrefixPath" using SWModule::getConfigEntry("PrefixPath"). This returns something like this:
/home/tobi/.sword/installMgr/20151110161300/
2) The last part of the path above is the "id" of the source repository
3) Looking up ~/.sword/installMgr/masterRepoList.conf I can find the mapping between the repo id and the actual repository name from a line like this one: 20151110161300=FTPSource=eBible.org|ftp.ebible.org|/sword

Would it make sense to provide a method in the SWModule or InstallMgr class to easily get this information? This would be useful meta information when showing an about dialog for a module and I also see other use cases.

Best regards,
Tobias


_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to