src-d / hercules

Gaining advanced insights from Git repository history.
Other
2.06k stars 146 forks source link

How to output as JSON instead of image? #395

Closed Luc45 closed 7 months ago

Luc45 commented 7 months ago

Hi!

I've been trying to output data in JSON format as per the documentation which states:

It is possible to output all the information needed to draw the plots in JSON format. Simply append .json to the output (-o) and you are done.

The command that I'm trying to execute: (I'm actually using Docker)

# Simplified example
hercules --first-parent --devs --languages php /repo |labours -m old-vs-new -o /io/results.json

And the error I receive is:

ValueError: Format 'json' is not supported (supported formats: eps, jpeg, jpg, pdf, pgf, png, ps, raw, rgba, svg, svgz, tif, tiff)

Is there a step I'm missing? Thanks!

Luc45 commented 7 months ago

Ah, I see that it works for burndown, but not for old-vs-new.

Luc45 commented 7 months ago

old-vs-new does not support JSON, it will only plot the data.