uri: XMPP URI parsing/generation

URI commands are helper to easily parse/build XMPP URIs.


Parse an XMPP URI, and print different parts.

When possible, the type of URI is shown (e.g. pubsub) and the sub_type (e.g. microblog).

The path is always displayed (see RFC 5122 Path section for details).

If suitable, you’ll also get data like node (for a PubSub URI).


Parse a blog URI:

$ li uri parse "xmpp:somebody@example.org?;node=urn%3Axmpp%3Amicroblog%3A0"


Build an XMPP URI according to arguments. 2 positional arguments are expected: type and path. For now, only pubsub type is supported.


Build XMPP URI for a blog:

$ li uri build pubsub somebody@example.org -f node urn:xmpp:microblog:0