diff options
author | Patrick Lehmann <Paebbels@gmail.com> | 2019-02-25 10:49:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 10:49:35 +0100 |
commit | a62344e4dce1a603cfda0c71a571e248694974ca (patch) | |
tree | e460aa85f9f627daf4d3335ffcaefcb50d4fcb17 /doc/helpers.py | |
parent | fb6fa7ceced6e74ae02ed24b92a488c6e65d3404 (diff) | |
parent | f83f6970faf9b58e1a87b2d73bc046c03dfc603d (diff) | |
download | ghdl-a62344e4dce1a603cfda0c71a571e248694974ca.tar.gz ghdl-a62344e4dce1a603cfda0c71a571e248694974ca.tar.bz2 ghdl-a62344e4dce1a603cfda0c71a571e248694974ca.zip |
Merge pull request #770 from 1138-4EB/doc-jsonshields
doc: Generate shields from JSON files instead of hard coding all of the in inc files.
Diffstat (limited to 'doc/helpers.py')
-rw-r--r-- | doc/helpers.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/helpers.py b/doc/helpers.py index dd028037e..bd8d10ad4 100644 --- a/doc/helpers.py +++ b/doc/helpers.py @@ -214,3 +214,22 @@ def printReleasesList(releases, latex=False): rs[x+1] = [r[1][1:-7]] + r printTab(rs) + +# +# Create shields/badges from JSON file +# + +def createShields(file='shields'): + shields = getJSON(file) + for k, v in shields.items(): + t = v['target'] + if t[0:3] == 'gh:': + t = 'https://github.com/' + t[3:] + + printShieldSrc( + 'SHIELD:'+k, + v['alt'], + 'https://img.shields.io/' + v['src'] + '&style=flat-square&longCache=true', + t, + False + ) |