Open nedbat opened 8 years ago
The documented way to get it now is to use the XML report, and parse the XML. The HTML report could include a small file containing the results, either as text, or JSON. There is a status.json file, but that is for internal use, and does not include the final results.
Hmm, I understand now, thanks. I wonder if this is better left to a separate tool, if coverage.py could make the total coverage number available in some convenient way.
Original comment by Florian Bruhin (Bitbucket: The-Compiler, GitHub: The-Compiler)
FWIW, I see @bjodah's usecase and now would like to do the same. The idea is that some kind of CI generates HTML reports for each push (see the leftmost column at http://qutebrowser.org:8010/waterfall for example), and then the readme could link to the .svg with some static link which shows the newest version, e.g. show an image like http://www.qutebrowser.org/coverage/archlinux/latest/coverage.svg
in my case.
Isn't it easier to use the shields.io URL syntax?: https://img.shields.io/badge/
@nedbat I see that you reviewed this relatively recently, so I assume this is still a live issue.
If I were considering whether to take this issue on, the hard part would be understanding which of the suggested changes is desired. If that were made clear I would hope this would be a pretty accessible task.
Originally reported by Anonymous
This is a feature request rather than an actual issue. I apologize if this is not the apropirate forum for this.
I was wondering if it would be possible to generate a svg badge for inclusion in the html report. My use-case is to have a badge in my README pointing to the master's branch html coverage report folder (which is published automatically by my CI server).
I reverse engineered
shields.io
's version into this script:the resulting svg file is about 0.7 kB.