allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.35k stars 1.11k forks source link

Download CSV from HTML report? #1073

Open gwideman opened 6 years ago

gwideman commented 6 years ago

I see that in the HTML report, in the left "gear" menu there's a function to export the data as JSON.

Is there a way to invoke the equivalent functionality, but as CSV?

For what it's worth, I think the customer to whom it's useful to present the nice HTML view is more likely to be able to wrangle CSV (in Excel) than JSON. At least it is in my case at hand :-).

allinurl commented 6 years ago

I agree, having a csv option is useful. Let me take a look at it, it think it shouldn't be to difficult to generate this from the JSON feed, though the only concern is that the JSON object is not completely flat.

gwideman commented 6 years ago

Thanks for your response! A couple of suggestions:

  1. Part of the impetus for a CSV export is to be able to browse a panel's data all at once, instead of 10 rows at a time. So a convenient UX for that desire could be a pop up view of only that one panel, expanded to show all rows (and including the same sort/filter features of the current panel).

  2. There certainly are separate motivations to obtain CSVs, for import into Excel or other tools. If non-flatness of the complete page's data presents an obstacle, might it make sense to have CSV download as a feature of the individual panel rather than the page?

allinurl commented 6 years ago
  1. I'm thinking, since the HTML report already contains all data, I could add an option to simply display all rows for the selected panel. Would that be something you're interested on?
  2. I'm trying to figure out a use case where it would make sense to download the whole report in CSV... Like you said, I think a CSV download per panel would make more sense. Thoughts?