scraperwiki / magic-summary-tool

ScraperWiki tool to summarise stuff about any table of data
8 stars 3 forks source link

Sharing static HTML of the whole output #59

Open IanHopkinson opened 11 years ago

IanHopkinson commented 11 years ago

I'd like to be able to share a URL for my summary. At the moment I screen shot then crop in PowerPoint, then email...

zarino commented 11 years ago

On the live data, or on the data as it was at the instant you "shared" the summary?

IanHopkinson commented 11 years ago

On the data at the instant I shared the summary. The images/media have hyperlinks which I'd like my sharee to have access to.

frabcus commented 10 years ago

So this would make a kind of static copy of the HTML, and let you share that?

IanHopkinson commented 10 years ago

Yes, zarino and I discussed this a bit. Making the summary "live" is not really desirable.

frabcus commented 10 years ago

Here's a prototype of one page frozen that I made yesterday for fun. I made it by the browser saving a frozen version of its HTML (i.e. $('html').html())

https://premium.scraperwiki.com/bl6ssyc/psrihabwlxvmrgm/http/x.html

Does that seem fit to purpose? Note that it doesn't have any of the post-facto interactive javascript (hover on the charts) because of how it was generated. There might be a way round that, but there isn't a cheap one :(

My idea would be to have a "Share" button that opens that up (possibly with a header to help you share it on Twitter, embed it or wthaever).

frabcus commented 10 years ago

Note for me: scraperwiki.readSettings() being null is the test for whether in frozen version or not.

IanHopkinson commented 10 years ago

That's progress! I note that my use case typically involves taking one of those panels to embed in a blog.

frabcus commented 10 years ago

So single panel is more important than whole page?

And actually, having a PNG file probably better than HTML? (To avoid any issues of HTTP vs. HTTPS)

zarino commented 10 years ago

If the HTML fragments you're currently saving aren't interactive (because they don't contain javascript) then saving to a image is indeed simpler and more compatible.

Are you going to just call the Google Image Charts API and generate a similar chart? Or are you going to try and convert the DOM into an image (using something like this)?

frabcus commented 10 years ago

@zarino, why I've not seen that HTML-renderer-in-Javascript-canvas, that's craziness! Alas, if you paste the URL https://premium.scraperwiki.com/bl6ssyc/psrihabwlxvmrgm/http/x.html into http://html2canvas.hertzen.com/screenshots.html you get a bit of a mess. Mainly in the SVG!

image

image

To be fair, you get some beauty too!

image

frabcus commented 10 years ago

Someone (@pwaller or @paulfurley) suggested using https://github.com/alphagov/screenshot-as-a-service from GDS. If it is super well made, it does feel like a service ScraperWiki would have found very useful in the past. (Our attempts on Classic often broke, as the underlying QT screenshot thing was flakey, and it needed a fake X window)

frabcus commented 10 years ago

BTW, @IanHopkinson those URLs on cobalt also work without https, e.g. http://premium.scraperwiki.com/bl6ssyc/psrihabwlxvmrgm/http/x.html - does that help with embedding?

IanHopkinson commented 10 years ago

@frabcus the embedding problem is that the Wordpress blog is on HTTP.

I think it was me who suggested screenshot-as-a-service ;-) @pwaller and @paulfurley will have a good opinion as to whether it is worth using.

frabcus commented 10 years ago

@IanHopkinson this is what one using HTML would look like embedded via an IFrame into WordPress: https://blog.scraperwiki.com/?p=758221627&preview=true

I'm not totally happy with it as you can't Tweet it easily, which would seem a major point of sharing :(

Link to just the HTML: https://premium.scraperwiki.com/bl6ssyc/psrihabwlxvmrgm/http/y.html

IanHopkinson commented 10 years ago

That looks nice! I take the point about not being able to tweet easily

frabcus commented 10 years ago

My instinct right now is to use screenshot-as-a-service, and then it becomes more a platform feature to use with other tools.

But stops it being an hour's quick work :(

How useful to you and other users would the HTML version be?

On Mon, May 12, 2014 at 11:53:43PM -0700, IanHopkinson wrote:

That looks nice! I take the point about not being able to tweet easily


Reply to this email directly or view it on GitHub: https://github.com/scraperwiki/magic-summary-tool/issues/59#issuecomment-42922882

pwaller commented 10 years ago

Is "taking a screenshot manually" really such a limiting factor for us?

GDS "need" this because they have lots of visitors who don't have browsers appropriate for viewing the pages. But until we're in that sort of situation I don't think we should do this.

pwaller commented 10 years ago

(Whether or not we use screenshot-as-a-service, I strongly suspect generating static images would be a significant time investment, so we should have a strong reason to use it).

IanHopkinson commented 10 years ago

I think the HTML view is worth doing but not the screenshot