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 | |
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.
-rw-r--r-- | doc/about.rst | 8 | ||||
-rw-r--r-- | doc/helpers.py | 19 | ||||
-rw-r--r-- | doc/index.rst | 6 | ||||
-rw-r--r-- | doc/shields.inc | 63 | ||||
-rw-r--r-- | doc/shields.json | 66 | ||||
-rw-r--r-- | doc/shieldswho.inc | 25 | ||||
-rw-r--r-- | doc/shieldswho.json | 26 |
7 files changed, 121 insertions, 92 deletions
diff --git a/doc/about.rst b/doc/about.rst index 6d2f28c20..e1018767a 100644 --- a/doc/about.rst +++ b/doc/about.rst @@ -1,4 +1,8 @@ -.. include:: shieldswho.inc +.. only:: html + + .. exec:: + from helpers import createShields + createShields('shieldswho') About GHDL ########## @@ -53,6 +57,6 @@ Who uses GHDL? | |SHIELD:gh-poc| | |SHIELD:rtd-poc| | `PoC-Library <https://github.com/VLSI-EDA/PoC>`_ | A Vendor-Independent, Open-Source IP Core and Utility Library. | +-------------------+--------------------+----------------------------------------------------+----------------------------------------------------------------+ | |SHIELD:gh-vunit| | |SHIELD:doc-vunit| | `VUnit <https://vunit.github.io/>`_ | A unit testing framework for VHDL/SystemVerilog | - +-------------------+--------------------+----------------------------------------------------+----------------------------------------------------------------+ + +-------------------+--------------------+----------------------------------------------------+----------------------------------------------------------------+ | |SHIELD:gl-p1076| | |SHIELD:tw-p1076| | `IEEE P1076 WG <https://www.eda-twiki.org/vasg/>`_ | IEEE P1076 Working Group [VASG] | +-------------------+--------------------+----------------------------------------------------+----------------------------------------------------------------+ 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 + ) diff --git a/doc/index.rst b/doc/index.rst index eb0270a66..c29deabda 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,7 +1,9 @@ -.. include:: shields.inc - .. only:: html + .. exec:: + from helpers import createShields + createShields() + |SHIELD:gh-logo| |SHIELD:gitter| |SHIELD:code-lic| |SHIELD:doc-lic| |SHIELD:travis-ci| |SHIELD:appveyor| |SHIELD:release| ------------------------------------ diff --git a/doc/shields.inc b/doc/shields.inc deleted file mode 100644 index 0f702c822..000000000 --- a/doc/shields.inc +++ /dev/null @@ -1,63 +0,0 @@ -.. |SHIELD:travis-ci| image:: https://img.shields.io/travis/ghdl/ghdl/master.svg?longCache=true&style=flat-square&logo=travis - :target: https://travis-ci.org/ghdl/ghdl - :alt: Build status by Travis-CI - -.. |SHIELD:appveyor| image:: https://img.shields.io/appveyor/ci/tgingold/ghdl-psgys/master.svg?longCache=true&style=flat-square&logo=appveyor&logoColor=aab2ab - :target: https://ci.appveyor.com/project/tgingold/ghdl-psgys/branch/master - :alt: Build status by AppVeyor - -.. |SHIELD:release| image:: https://img.shields.io/github/release/ghdl/ghdl.svg?longCache=true&style=flat-square&label=latest%20release - :target: https://github.com/ghdl/ghdl/releases - :alt: Latest release - -.. |SHIELD:code-lic| image:: https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?longCache=true&style=flat-square&label=license&logo=gnu - :target: Licenses.html - :alt: GNU General Public License 2 - -.. |SHIELD:doc-lic| image:: https://img.shields.io/badge/doc%20license-CC--BY--SA--4.0-aab2ab.svg?longCache=true&style=flat-square - :target: Licenses.html - :alt: Creative Commons Attribution-ShareAlike 4.0 - -.. |SHIELD:gitter| image:: https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=4db797 - :target: https://gitter.im/ghdl1/Lobby - :alt: Talk to us on Gitter - -.. |SHIELD:issues-new| image:: https://img.shields.io/badge/new-issue-yellowgreen.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/issues/new - :alt: Open new issue at GitHub - -.. |SHIELD:new-pr| image:: https://img.shields.io/badge/new-pull--request-yellowgreen.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/compare/ - :alt: Open new Pull Request (PR) at GitHub - -.. |SHIELD:bug-report| image:: https://img.shields.io/badge/new-bug--report-yellowgreen.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/issues/new?template=bug_report.md - :alt: Open new bug report at GitHub - -.. |SHIELD:feature-request| image:: https://img.shields.io/badge/new-feature--request-yellowgreen.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/issues/new?template=feature_request.md - :alt: Open new feature request at GitHub - -.. |SHIELD:issues-open| image:: https://img.shields.io/github/issues/ghdl/ghdl.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/issues - :alt: Open issues - -.. |SHIELD:issues-closed| image:: https://img.shields.io/github/issues-closed-raw/ghdl/ghdl.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/issues?q=is%3Aissue+is%3Aclosed - :alt: Closed issues - -.. |SHIELD:issues-pr| image:: https://img.shields.io/github/issues-pr/ghdl/ghdl.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/pulls - :alt: Open pull requests - -.. |SHIELD:issues-pr-closed| image:: https://img.shields.io/github/issues-pr-closed-raw/ghdl/ghdl.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/pulls - :alt: Closed pull requests - -.. |SHIELD:contributors| image:: https://img.shields.io/github/contributors/ghdl/ghdl.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl/graphs/contributors - :alt: Contributors - -.. |SHIELD:gh-logo| image:: https://img.shields.io/badge/-ghdl/ghdl-323131.svg?style=flat-square&logo=github - :target: https://github.com/ghdl/ghdl - :alt: Source Code on GitHub diff --git a/doc/shields.json b/doc/shields.json new file mode 100644 index 000000000..e0be16551 --- /dev/null +++ b/doc/shields.json @@ -0,0 +1,66 @@ +{ + "travis-ci": { + "src": "travis/ghdl/ghdl/master.svg?logo=travis", + "target": "https://travis-ci.org/ghdl/ghdl", + "alt": "Build status by Travis-CI" }, + "appveyor": { + "src": "appveyor/ci/tgingold/ghdl-psgys/master.svg?logo=appveyor&logoColor=aab2ab", + "target": "https://ci.appveyor.com/project/tgingold/ghdl-psgys/branch/master", + "alt": "Build status by AppVeyor" }, + "release": { + "src": "github/release/ghdl/ghdl.svg?label=latest%20release", + "target": "gh:ghdl/ghdl/releases", + "alt": "Latest release" }, + "code-lic": { + "src": "badge/code%20license-GPLv2-bd0000.svg?label=license&logo=gnu", + "target": "Licenses.html", + "alt": "GNU General Public License 2" }, + "doc-lic": { + "src": "badge/doc%20license-CC--BY--SA--4.0-aab2ab.svg?", + "target": "Licenses.html", + "alt": "Creative Commons Attribution-ShareAlike 4.0" }, + "gitter": { + "src": "badge/chat-on%20gitter-4db797.svg?logo=gitter&logoColor=4db797", + "target": "https://gitter.im/ghdl1/Lobby", + "alt": "Talk to us on Gitter" }, + "issues-new": { + "src": "badge/new-issue-yellowgreen.svg?logo=github", + "target": "gh:ghdl/ghdl/issues/new", + "alt": "Open new issue at GitHub" }, + "new-pr": { + "src": "badge/new-pull--request-yellowgreen.svg?logo=github", + "target": "gh:ghdl/ghdl/compare/", + "alt": "Open new Pull Request (PR) at GitHub" }, + "bug-report": { + "src": "badge/new-bug--report-yellowgreen.svg?logo=github", + "target": "gh:ghdl/ghdl/issues/new?template=bug_report.md", + "alt": "Open new bug report at GitHub" }, + "feature-request": { + "src": "badge/new-feature--request-yellowgreen.svg?logo=github", + "target": "gh:ghdl/ghdl/issues/new?template=feature_request.md", + "alt": "Open new feature request at GitHub" }, + "lissues-open": { + "src": "github/issues/ghdl/ghdl.svg?logo=github", + "target": "gh:ghdl/ghdl/issues", + "alt": "Open issues" }, + "issues-closed": { + "src": "github/issues-closed-raw/ghdl/ghdl.svg?logo=github", + "target": "gh:ghdl/ghdl/issues?q=is%3Aissue+is%3Aclosed", + "alt": "Closed issues" }, + "issues-pr": { + "src": "github/issues-pr/ghdl/ghdl.svg?logo=github", + "target": "gh:ghdl/ghdl/pulls", + "alt": "Open pull requests" }, + "issues-pr-closed": { + "src": "github/issues-pr-closed-raw/ghdl/ghdl.svg?logo=github", + "target": "gh:ghdl/ghdl/pulls", + "alt": "Closed pull requests" }, + "contributors": { + "src": "github/contributors/ghdl/ghdl.svg?logo=github", + "target": "gh:ghdl/ghdl/graphs/contributors", + "alt": "Contributors" }, + "gh-logo": { + "src": "badge/-ghdl/ghdl-323131.svg?logo=github", + "target": "gh:ghdl/ghdl", + "alt": "Source Code on GitHub" } +} diff --git a/doc/shieldswho.inc b/doc/shieldswho.inc deleted file mode 100644 index 5dd277cdb..000000000 --- a/doc/shieldswho.inc +++ /dev/null @@ -1,25 +0,0 @@ -.. |SHIELD:gh-poc| image:: https://img.shields.io/badge/-VLSI--EDA/PoC-323131.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/VLSI-EDA/PoC - :alt: Source Code on GitHub - -.. |SHIELD:rtd-poc| image:: https://img.shields.io/badge/-poc--library-2980b9.svg?longCache=true&style=flat-square&logo=read-the-docs - :target: http://poc-library.readthedocs.io/en/latest/?badge=latest - :alt: Documentation on ReadTheDocs - -.. |SHIELD:gh-vunit| image:: https://img.shields.io/badge/-VUnit/vunit-323131.svg?longCache=true&style=flat-square&logo=github - :target: https://github.com/VUnit/vunit - :alt: Source Code on GitHub - -.. |SHIELD:doc-vunit| image:: https://img.shields.io/badge/doc-vunit.github.io-blue.svg?style=flat - :target: https://vunit.github.io/documentation - :alt: Documentation on vunit.github.io - -.. |SHIELD:gl-p1076| image:: https://img.shields.io/badge/-IEEE--P1076-323131.svg?longCache=true&style=flat-square&logo=gitlab - :target: https://gitlab.com/IEEE-P1076 - :alt: Source Code on GitLab - -.. only:: html - - .. |SHIELD:tw-p1076| image:: https://img.shields.io/badge/-eda--twiki.org-critical.svg?longCache=true&style=flat-square&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIWAhImtwMY5AAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAACwUlEQVRYw%2B1XTWgTQRT%2BZpOokURDg6GiaAwoCEX8QQpevFTQHgTBY8FrERSstKLePVSleLSH3qUFRSx48CR4CIJU8BC0WKqVULQiJsZmZ94%2BD83GJPOTDR68dGHZXYb3vu99882bWWDz%2Bs%2BXCF%2F408Au%2BD9GoaqXoIICFAQUAAWAGk%2FXTQCkAFSwhiAxD94%2BJS6vLEQiwOULp1B5Og9JGS2xbCEgDcDheOcYxQhb%2BibF2NdbTgL8%2BWQOv98sQlJaSyQ7qpeW6k0kQkWyR86Jq2%2Bf2wh4qK%2BMdgWXBnBpeaoWMpKB1dIztwKl9BL8Sl4DF6lXkMGyltT%2BruCrs%2FD9nJYre%2FCMuP3hhYlAHH5tvz5%2FAJL5B%2BL0u9leHM13My8h%2FZyWq1ot2KdAsdACFAAVxHpeUzZ%2F1Nc9BwHD3IXf%2F0og9A4Ja0jcCC4B8PfjPJuqNsfFtkUx8q3UlJvZw730eRBUI2YdvuzTTBrmdRIggwfqq%2BNQGG%2BuBtAkgBstsTHUfz1ur5j1FSEBJBBBAW2Nc8d0cKBFh4BdO6SLADk6XOs392A61YsCUcBVD6YzKeAwtOfs%2FW1O7kJAWjYtW6zmAVcFBCBwEJBdPKCimpAcVQkLARlxu3YSkBZg6pLAthWbVHWakAwHj04fmJopORSI2FXNCpBBjaBHBWQEBTf6gAdQ4PaATQFlUa6TmE9sJ4DkEmTlgBOcABD385XUMZAQUGBcP5To2v3CnIE3DOAhXxwUYq7I7QeS6d038bN8xwm%2B0QsYBO4Y89o2Hd%2BigAQwMDgl5opjeiOKZ6fBW9esFfxtRAISXgPUawO3kW7N97p4jQ%2FvfMQjw%2Fv0U%2FHM0X6U339BreZZk5gAQol9B7huygB7CvfFwseJ9v%2BCmaEMlosTUBhCfMcJqJY2TQ7DKccyNHVUBcAPgESSsDf%2FZPPXbPP6A13nhms8bYukAAAAAElFTkSuQmCC - :target: http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/WebHome - :alt: Documentation on eda-twiki.org diff --git a/doc/shieldswho.json b/doc/shieldswho.json new file mode 100644 index 000000000..23b3d19b4 --- /dev/null +++ b/doc/shieldswho.json @@ -0,0 +1,26 @@ +{ + "gh-poc": { + "src": "badge/-VLSI--EDA/PoC-323131.svg?logo=github", + "target": "gh:VLSI-EDA/PoC", + "alt": "Source Code on GitHub" }, + "rtd-poc": { + "src": "badge/-poc--library-2980b9.svg?logo=read-the-docs", + "target": "http://poc-library.readthedocs.io/en/latest/?badge=latest", + "alt": "Documentation on ReadTheDocs" }, + "gh-vunit": { + "src": "badge/-VUnit/vunit-323131.svg?logo=github", + "target": "gh:VUnit/vunit", + "alt": "Source Code on GitHub" }, + "doc-vunit": { + "src": "badge/doc-vunit.github.io-blue.svg?", + "target": "https://vunit.github.io/documentation", + "alt": "Documentation on vunit.github.io" }, + "gl-p1076": { + "src": "badge/-IEEE--P1076-323131.svg?logo=gitlab", + "target": "https://gitlab.com/IEEE-P1076", + "alt": "Source Code on GitLab" }, + "tw-p1076": { + "src": "badge/-eda--twiki.org-critical.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIWAhImtwMY5AAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAACwUlEQVRYw%2B1XTWgTQRT%2BZpOokURDg6GiaAwoCEX8QQpevFTQHgTBY8FrERSstKLePVSleLSH3qUFRSx48CR4CIJU8BC0WKqVULQiJsZmZ94%2BD83GJPOTDR68dGHZXYb3vu99882bWWDz%2Bs%2BXCF%2F408Au%2BD9GoaqXoIICFAQUAAWAGk%2FXTQCkAFSwhiAxD94%2BJS6vLEQiwOULp1B5Og9JGS2xbCEgDcDheOcYxQhb%2BibF2NdbTgL8%2BWQOv98sQlJaSyQ7qpeW6k0kQkWyR86Jq2%2Bf2wh4qK%2BMdgWXBnBpeaoWMpKB1dIztwKl9BL8Sl4DF6lXkMGyltT%2BruCrs%2FD9nJYre%2FCMuP3hhYlAHH5tvz5%2FAJL5B%2BL0u9leHM13My8h%2FZyWq1ot2KdAsdACFAAVxHpeUzZ%2F1Nc9BwHD3IXf%2F0og9A4Ja0jcCC4B8PfjPJuqNsfFtkUx8q3UlJvZw730eRBUI2YdvuzTTBrmdRIggwfqq%2BNQGG%2BuBtAkgBstsTHUfz1ur5j1FSEBJBBBAW2Nc8d0cKBFh4BdO6SLADk6XOs392A61YsCUcBVD6YzKeAwtOfs%2FW1O7kJAWjYtW6zmAVcFBCBwEJBdPKCimpAcVQkLARlxu3YSkBZg6pLAthWbVHWakAwHj04fmJopORSI2FXNCpBBjaBHBWQEBTf6gAdQ4PaATQFlUa6TmE9sJ4DkEmTlgBOcABD385XUMZAQUGBcP5To2v3CnIE3DOAhXxwUYq7I7QeS6d038bN8xwm%2B0QsYBO4Y89o2Hd%2BigAQwMDgl5opjeiOKZ6fBW9esFfxtRAISXgPUawO3kW7N97p4jQ%2FvfMQjw%2Fv0U%2FHM0X6U339BreZZk5gAQol9B7huygB7CvfFwseJ9v%2BCmaEMlosTUBhCfMcJqJY2TQ7DKccyNHVUBcAPgESSsDf%2FZPPXbPP6A13nhms8bYukAAAAAElFTkSuQmCC", + "target": "http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/WebHome", + "alt": "Documentation on eda-twiki.org" } +}
\ No newline at end of file |