forums: forums topics handling

Forums are internally a way to organise blog nodes open to many publishers. The forums commands let you manage the structure of topics. You may have several different structures in one PubSub forums node, this can be useful if you have multi-lingual forums.


Get and print the structure of forums. Beside the classic PubSub node arguments, you may specify the KEY of the forum with -k KEY, --key KEY. This can be used to have several structures of forums, for instance one per language.

If you use the default output, the verbosity is used to retrieve details of topics.


Get structure of default forum with details:

$ jp forums get -v

Get structure of French forums in JSON:

$ jp forums get -k fr -O json


Edit the structure of XMPP forums. As for jp-forums_get you may specify the key beside the classic PubSub node arguments. The edition works the same as for edit.

To edit the structure you’ll get a JSON file which is a list of object where the topic metadata are set. You can use the following metadata:

a language code, using ISO 639
short name of the forum
title of the topic/category in the given language
small description of the topic/category
long description of the topic/category
URI to the PubSub node containing the messages of the topic (it’s actually a blog node with suitable permissions). URI must only be set for topic, not for categories.
list of object with the same metadata (i.e. other topics or categories)

Here is a small example of a forum structure:

        "main-language": "en",
        "name": "short-name",
        "title": "This is a category",
        "short-desc": "short description about the category",
        "desc": "this is a an example of a long description"
        "sub-forums": [
                "uri": ";node=org.salut-a-toi.forums%3A0_L5SaR5WYafXmUyD46R2avf",
                "title": "some intereting topic",
                "short-desc": "This is a description explaining what the topic is about"
                "uri": ";node=org.salut-a-toi.forums%3A0_L5SaR5WYafXmUyD46R2avf",
                "title": "a second topic",
                "short-desc": "This topic is about bla bla bla"
        "main-language": "en",
        "title": "An other category",
        "sub-forums": [
                "uri": ";node=org.salut-a-toi.forums%3A0_L5SaR5WYafXmUyD46R2avf",
                "title": "yet another topic",
                "short-desc": "This is a demo topic, made for an example"


Edit structure of forums on a PubSub service:

$ jp forums edit -s