docs: better docs, mv doxygen to sphinx
[vpp.git] / docs / _scripts / siphon_templates / markdown / clicmd / item_format.md
1 {#
2 # Copyright (c) 2016 Comcast Cable Communications Management, LLC.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #}
16 {% set v = item['value'] %}
17 {% if 'short_help' in v %}
18 {% set str = v['short_help'] %}
19 {% set str = this.unescape(str) %}
20
21 {# Summary/usage #}
22 {{ item['value']['path'] }}
23 -------------------------------------------------------------------------
24
25 .. code-block:: console
26
27     {{ this.reindent(str, 4) }}
28
29 {% endif %}
30 {% if 'long_help' in v %}
31 {% set long_help = v['long_help'] %}
32 {% set long_help = this.unescape(long_help) %}
33 {# This is seldom used and will likely be deprecated #}
34 {# Long help #}
35 .. code-block:: console
36
37     {{ this.reindent(long_help, 4) }}
38
39 {% endif %}
40 {% if 'siphon_block' in item['meta'] %}
41 {% set sb = item["meta"]["siphon_block"] %}
42 {% set sb = this.process_special(sb) %}
43 {% if sb %}
44 {# Extracted from the code in /*? ... ?*/ blocks #}
45
46 {# Description #}
47
48 {{ sb }}
49 {% endif %}
50 {% endif %}
51 {% if 'name' in meta or 'function' in v %}
52 {# Gives some developer-useful linking #}
53
54 {% if "name" in meta %}
55 Declaration: ``{{ meta['name'] }}`` `{{ meta["file"] }} line {{ item["meta"]["line_start"] }} <{{ this.repository_link }}{{ meta["file"] }}#L{{ item["meta"]["line_start"] }}>`_
56 {% endif %}
57 {% if "function" in v %}
58
59 Implementation: ``{{ v["function"] }}``
60 {% endif %}
61 {% endif %}
62