views:

56

answers:

1

Other ideas are also welcome. I am trying to take an excel file, using python to generate an xml for a javascript html webpage that will essentially display a gallery (or some sort of directory structure). The excel file would be pretty massive, but let us assume time isn't so crucial.

So far I can convert the tab delimited version of the excel spreadsheet into XML and I have all of the links... Now, I just need to able to open up a browser and take a screenshot and crop them the right way, or save certain portions of the web content some how....

I was thinking about using selenium as a web crawler then using autoit execute keyboard commands to save all the webpages, but that won't work for various reasons (also it would be extremely slow).

Ideas?

One example where I've seen a "smart crop" take place is in camtasia where they zoom in on certain parts of the screen where they think to focus would be. I think that could work to some degree. Then again I don't have any idea how to make such assumptions with a good deal of accuracy.

+1  A: 

You could probably use pywebkitgtk to render the HTML and then PIL to manipulate the image.

Ignacio Vazquez-Abrams