From 400ccb02b6017bec4c452b62478b0db21be27b66 Mon Sep 17 00:00:00 2001 From: Mark Hansen Date: Thu, 22 Oct 2020 21:16:28 +1100 Subject: [PATCH] attrs.html: Rename 'kind' to 'types'. Matches the title of the table, and colloquial use. --- doc/infosrc/attrs | 6 +++--- doc/infosrc/mkattrs.py | 6 +++--- doc/infosrc/templates/attrs.html.j2 | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/infosrc/attrs b/doc/infosrc/attrs index c3c4605a0..c3707d261 100644 --- a/doc/infosrc/attrs +++ b/doc/infosrc/attrs @@ -2,15 +2,15 @@ # Each item consist of a header line, followed by a description in HTML. # # The header line has the format -# :name:uses:kind[:dflt[:minv]]; [notes] +# :name:used_by:types[:dflt[:minv]]; [notes] # where # name has the format name1[/namei]*[ notes] # the note can be used as a comment # -# uses is a string consisting of G,C,N,E, indicating that the attribute +# used_by is a string consisting of G,C,N,E, indicating that the attribute # applies to graphs, clusters, nodes and edges, respectively. # -# kind has the format type[/typei]* +# types has the format type[/typei]* # type can be int, bool, string, double, or a special . # In the last case, we assume there is an entry for in # the types file. diff --git a/doc/infosrc/mkattrs.py b/doc/infosrc/mkattrs.py index fa4616124..afdfe22f2 100755 --- a/doc/infosrc/mkattrs.py +++ b/doc/infosrc/mkattrs.py @@ -20,7 +20,7 @@ class Attribute: name: str # use string : this is a string formed of G,N,C,E used_by: str - kinds: List[str] + types: List[str] flags: List[str] html_description: str defaults: List[str] @@ -41,14 +41,14 @@ with open(sys.argv[1]) as attrs_in: if line.startswith(':'): # This is a header line. Grab out the values. - # :name:used_by:kind[:dflt[:minv]]; [notes] + # :name:used_by:types[:dflt[:minv]]; [notes] headers, _, flags = line.rpartition(';') parts = headers.split(':') attr = Attribute( name=parts[1], used_by=parts[2], - kinds=parts[3].split('/'), + types=parts[3].split('/'), flags=[flag for flag in flags.strip().split(',') if flag], # Set an empty string html description, ready to append to. html_description='', diff --git a/doc/infosrc/templates/attrs.html.j2 b/doc/infosrc/templates/attrs.html.j2 index 7e90421d5..55066fea8 100644 --- a/doc/infosrc/templates/attrs.html.j2 +++ b/doc/infosrc/templates/attrs.html.j2 @@ -94,11 +94,11 @@ of the layout programs. {{ attr.name }} {{ attr.used_by }} - {%- for kind in attr.kinds -%} + {%- for type in attr.types -%} {%- if not loop.first -%}
{%- endif -%} - {{kind}} + {{type}} {%- endfor -%} -- 2.40.0