diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2019-04-24 13:19:46 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2019-04-24 13:19:46 +0200 |
commit | 41c5a9c5a601733809f15b98a3ba79db8f896518 (patch) | |
tree | 8abb20326af0184e08c1fef6aeb566c66b53d31d | |
parent | ea40d481ad8c68baab770af48d36014facb9cfbb (diff) |
Add html templates for generating nice report websites
-rw-r--r-- | etc/README.md | 13 | ||||
-rw-r--r-- | etc/compare.html | 45 | ||||
-rw-r--r-- | etc/problems.html | 28 | ||||
-rw-r--r-- | etc/project.html | 36 |
4 files changed, 122 insertions, 0 deletions
diff --git a/etc/README.md b/etc/README.md new file mode 100644 index 0000000..c93152b --- /dev/null +++ b/etc/README.md @@ -0,0 +1,13 @@ +# HTML templates + +This directory contains HTML templates which can be used with the "json" output +format and a tool that can fill templates with data. +For example, this can be used with [hdlbr](https://github.com/quitoque/hdlbr) +to generate nice websites for the reported data. + +## Usage with hdlbr + +```bash +repolocli -o json ... > data.json +hdlbr data.json template.html > output.html +``` diff --git a/etc/compare.html b/etc/compare.html new file mode 100644 index 0000000..38e150e --- /dev/null +++ b/etc/compare.html @@ -0,0 +1,45 @@ +<html> + <head> + <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous"> + </head> + <body> + <center> + <table class="pure-table pure-table-horizontal pure-table-striped"> + <thead> + <tr> + <th>Package</th> + <th>Local Version</th> + <th>External Versions</th> + </tr> + </thead> + + <tbody> + {{~#each . as |t|}} + <tr> + <td>{{t.package_name}}</td> + <td>{{t.local_version}}</td> + <td> + <table class="pure-table pure-table-horizontal pure-table-striped"> + <thead> + <tr> + <th>Repo</th> + <th>Version</th> + </tr> + </thead> + <tbody> + {{~#each t.comparisons as |c|}} + <tr> + <td>{{c.repo}}</td> + <td>{{c.version}}</td> + </tr> + {{~/each}} + </tbody> + </table> + </td> + </tr> + {{~/each}} + </tbody> + </table> + </center> + </body> +</html> diff --git a/etc/problems.html b/etc/problems.html new file mode 100644 index 0000000..bbb66ef --- /dev/null +++ b/etc/problems.html @@ -0,0 +1,28 @@ +<html> + <head> + <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous"> + </head> + <body> + <table class="pure-table pure-table-horizontal pure-table-striped"> + <thead> + <tr> + <th>Repo</th> + <th>Package</th> + <th>Maintainer</th> + <th>Problem</th> + </tr> + </thead> + + <tbody> + {{~#each . as |t|}} + <tr> + <td>{{t.repo}}</td> + <td>{{t.name}}</td> + <td>{{t.maintainer}}</td> + <td>{{t.problem}}</td> + </tr> + {{~/each}} + </tbody> + </table> + </body> +</html> diff --git a/etc/project.html b/etc/project.html new file mode 100644 index 0000000..74242e7 --- /dev/null +++ b/etc/project.html @@ -0,0 +1,36 @@ +<html> + <head> + <link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous"> + </head> + <body> + <center> + <h1> + {{#if .}} + {{#with . as |t|}} + {{t.[0].name}} + {{/with}} + {{/if}} + </h1> + <hr /> + <table class="pure-table pure-table-horizontal pure-table-striped"> + <thead> + <tr> + <th>Repo</th> + <th>Version</th> + <th>Status</th> + </tr> + </thead> + + <tbody> + {{~#each . as |t|}} + <tr> + <td>{{t.repo}}</td> + <td>{{t.version}}</td> + <td>{{t.status}}</td> + </tr> + {{~/each}} + </tbody> + </table> + </center> + </body> +</html> |