facebook_data_analyzer icon indicating copy to clipboard operation
facebook_data_analyzer copied to clipboard

HTML files

Open Lackoftactics opened this issue 7 years ago • 5 comments

What do you think about adding html output? That would be much readable for all humans. Also in the future we could add real charts but for now creating some simple html would be great. Inside this html we could also add some sharing buttons, so people could also post it on social media and share they results.

I am also thinking about adding github page but that's for later.

@northcott-j @MetricMike thanks again for great work on repo. Any of you to tackle this task?

Lackoftactics avatar Apr 30 '18 11:04 Lackoftactics

@Lackoftactics: excellent ideas. IMHO, a page will scale this awesome app a lot. I created a simple html output. No formatting or sharing buttons yet. Running the app now outputs both xls and html. Interested to hear other contributors' ideas / approaches on this.

marzann avatar Apr 30 '18 16:04 marzann

@marzann @Lackoftactics - I agree! A web interface would would be a great addition. If a simple HTML view is the goal, I can look into adding some CSS and the share buttons to @marzann's contribution when it's merged.

Another option is to create some kind of json export of all of the information and leverage some frontend JS framework to create charts and different breakdowns.

northcott-j avatar Apr 30 '18 16:04 northcott-j

I am really +1 on creating those charts from created json

Lackoftactics avatar Apr 30 '18 18:04 Lackoftactics

@Lackoftactics - ok! I'll look into generating an HTML view from a JSON file. My initial thought is to make a new Ruby class e.g. a ViewModel and implement one for each HTML page.

That JSON will contain a section tables that will be a Hash of table_DOM_id to Array(Array(Values)) which will be used to recreate the Excel tables (or show any other kind of info in an HTML table).

It will also contain a section charts that will be a Hash of chart_DOM_id to a Hash of config info (I'll probably use Chart.js).

I'll probably try to use vanilla JS/JQuery to load the JSON, target the relevant DOM ID in the HTML doc, and inject the rows or load the Charts.

Then there will be an index.html that can have an intro to the project, how sharing works, and links to all of the different breakdowns.

-- I'll try to find some time to work on this implementation, but if anyone has a different approach or is interested in taking this on - they're more than welcome

northcott-j avatar Apr 30 '18 19:04 northcott-j

@northcott-j you could make use of nokogiri in order to create the html markup.

  spec.add_dependency 'nokogiri', '~> 1.8.2' # parser

thnukid avatar May 10 '18 09:05 thnukid