docs: convert plugins doc md->rst
[vpp.git] / doxygen / 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 {{ "@section %s %s" % (meta['label'], v['path']) }}
18 {% if 'short_help' in v %}
19
20 ### Summary/usage
21
22 {% set str = v['short_help'] %}
23 {% set period = "." if str[-1] != "." else "" %}
24 {% set prefix = "    " if "[" in str or "<" in str or "|" in str else "" %}
25 {% set str = this.unescape(str) %}
26 {{ "%s%s%s" % (prefix, str, period) }}
27 {% endif %}
28 {% if 'long_help' in v %}
29 {# This is seldom used and will likely be deprecated #}
30
31 ### Long help
32
33 {{ v['long_help'] }}
34 {% endif %}
35 {% if 'siphon_block' in item['meta'] %}
36 {% set sb = item["meta"]["siphon_block"] %}
37 {% if sb %}
38 {# Extracted from the code in /*? ... ?*/ blocks #}
39
40 ### Description
41
42 {{ sb }}
43 {% endif %}
44 {% endif %}
45 {% if 'name' in meta or 'function' in v %}
46 {# Gives some developer-useful linking #}
47
48 ### Declaration and implementation
49 {% if "name" in meta %}
50
51 {{ "Declaration: @ref %s (@ref %s line %d)" %
52    (meta['name'], meta["file"], item["meta"]["line_start"]) }}
53 {% endif %}
54 {% if "function" in v %}
55
56 {{ "Implementation: @ref %s." % v["function"] }}
57 {% endif %}
58 {% endif %}
59