aboutsummaryrefslogtreecommitdiffstats
path: root/doc/helpers.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Paebbels@gmail.com>2022-02-23 23:41:45 +0100
committerGitHub <noreply@github.com>2022-02-23 23:41:45 +0100
commit8fb84c1ca46c299996886dd22a7796817015c681 (patch)
tree024d4a6333005c406012af6453b1e74957b23eb5 /doc/helpers.py
parent1325d61a595f90239a93e90c930c9bcbd725d3b3 (diff)
parenta8913e8fa4ee1c92ee008a77487a614014c45fb6 (diff)
downloadghdl-8fb84c1ca46c299996886dd22a7796817015c681.tar.gz
ghdl-8fb84c1ca46c299996886dd22a7796817015c681.tar.bz2
ghdl-8fb84c1ca46c299996886dd22a7796817015c681.zip
Doc: add Overview diagram, fix shields in tables, use extlinks more
Diffstat (limited to 'doc/helpers.py')
-rw-r--r--doc/helpers.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/doc/helpers.py b/doc/helpers.py
index 9baddf700..5d099e729 100644
--- a/doc/helpers.py
+++ b/doc/helpers.py
@@ -26,13 +26,19 @@ def printShieldSrc(label, alt, img, target, latex=False):
if latex:
if label[-6:] == '/total':
label = label[:-6]
- print('.. |l' + re.compile('[\W_]+').sub('', label) + '| replace:: `' + label + '`_')
- print('.. _' + label + ': ' + target + '\n')
+ idx = re.compile('[\W_]+').sub('', label)
+ print(f"""
+.. |l{idx}| replace:: `{label}`_
+.. _{label}: {target}
+""")
else:
- print('.. |' + label + '| image:: '+ img + '\n',
- ' :target: ' + target + '\n',
- ' :height: 22\n',
- ' :alt: ' + alt + '\n')
+ print(f'''
+.. |{label}| image:: {img}
+ :target: {target}
+ :height: 22
+ :alt: {alt}
+ :class: shield
+''')
#
# Create shields/badges from JSON file