[sword-devel] Proposed extension to the URI scheme

Nic Carter niccarter at mac.com
Tue Sep 14 01:03:39 MST 2010


Hi gang,

I've been talking to a PocketSword user (who wishes to launch PS from other iPhone apps using sword:// ) and we've come up with an extension to the standard URI scheme.

I have documented it in the wiki:  http://crosswire.org/wiki/Frontends:URI_Standard#Proposed_extension

Note that this extension is probably only going to be used on iOS devices at this point, hence probably doesn't need to be implemented anywhere else, but I like things being standard, rather than everyone doing things their own way.  But if other front-ends want to be able to support this, the minimum amount of effort required should be to parse until hitting a '?' (or the end of the URI) and only use that part and ignoring the rest of the URI (which is completely optional)?  That's assuming that a key for a GenBook (or dictionary) can't contain a '?' character...

Reproduced here from the wiki:

We (PocketSword) are looking at extending the current situation to allow other applications to open a particular module/verse in our front-end (and, possibly, others?). We're taking the current situation and adding an optional query to the end of the URI. The query is only looked at if the module requested is empty or the module is not installed.
The new format would be:

	sword://[optional module]/[ref, module type dependent][optional query]

where the optional query is in the form:

	?type=[module type]&module=list

where
	• module type == 'bible' || 'commentary' || 'dictionary' || 'genbook' (etc)
	• module=list part is optional and means that if the supplied module isn't installed (or there is no module specified), the app will firstly bring up a list of modules of the type specified & then when the user selects a module, the verse is viewed in that module. How this is actually done in different front-ends is up to each front-end, but that's the idea for PocketSword.

So, if we don't have a module specified OR the specified module isn't installed, then:
	• IF module=list is specified, we will bring up a list of the modules, as described above.
	• ELSE we will use the default module of the type specified.


Thanks heaps, and comments and suggestions very welcome!  :)
ybic
	nic...  :)

----
Nic Carter
PocketSword Developer - an iPhone Bible Study app
www: http://crosswire.org/pocketsword
iTunes: http://itunes.apple.com/app/Pocketsword/id341046078
Twitter: http://twitter.com/pocketsword




More information about the sword-devel mailing list