Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support of json format #62

Closed
anujuber opened this issue Jan 16, 2021 · 5 comments · Fixed by #84
Closed

support of json format #62

anujuber opened this issue Jan 16, 2021 · 5 comments · Fixed by #84
Assignees
Milestone

Comments

@anujuber
Copy link

Can we have json and yaml output format support.

@roskakori
Copy link
Owner

JSON shouldn't be too much work, so probably yes. YAML is a bit of a mess and would require some external library like PyYAML, so it would be interesting to know what's the actual benefit over JSON.

Concerning the actual structure: Are there any existing tools or applications you would like to use the output with? If yes, it might be sensible to support an existing format (similar to cloc-xml, which didn't reinvent the wheel either).

@roskakori roskakori self-assigned this May 16, 2021
@anuj-devops
Copy link

anuj-devops commented May 17, 2021

There was a adhoc requirement to count the source code lines of multiple repositories. Json format is more easy to parse than summary type output by automation. that's the only intent to have Json format support.
i logged-in with different account instead of anujuber account. sorry for confusion :)

@roskakori roskakori linked a pull request Jan 5, 2022 that will close this issue
@roskakori roskakori changed the title support of json and yaml format support of json format Jan 5, 2022
@roskakori
Copy link
Owner

Removed YAML from subject as there does not seem to be a compelling reason to support it.

@roskakori roskakori added this to the v1.3.0 milestone Jan 5, 2022
roskakori added a commit that referenced this issue Jan 5, 2022
#62 Added JSON as additional output --format.
@roskakori
Copy link
Owner

Just merged this into the master branch. Should make it to PyPI sometime next week.

You can already read the documentation at https://pygount.readthedocs.io/en/latest/json.html.

roskakori added a commit that referenced this issue Jan 5, 2022
…was a copy and paste of "files per second".
roskakori added a commit that referenced this issue Jan 5, 2022
#62 Fixed computation of runtime statistic "lines per second".
@roskakori
Copy link
Owner

Pygount 1.3.0 with JSON support is now available from PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants