[MacRuby-devel] Small WebView commandline script

Andrew O'Brien obrien.andrew at gmail.com
Tue Aug 2 13:58:53 PDT 2011


I've been doing some HTML scraping with Mechanize recently and I figured I could use a small tool that opens up a small WebView and reads HTML fragments from STDIN. Here's what I came up with:

 https://gist.github.com/1121174

There are a couple of things wrong with it that I chalk up to noobishness (and the fact that I usually start with an application template in XCode and use Objective-C), that I could use some help on:

1) Despite passing in Closable and Resizeable, the window doesn't seem to do either. Also I can never get focus or scroll. Does the window need to be open in a different thread? Have a window controller? If so, what's the best way to do that? (Most of the tutorials I've seen are either full Applications or minimal scripts with no UI.)
2) Is there anyway to embed/access a web developer console like the one in Safari?

Thanks.

-- 
–Andrew O'Brien

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110802/019cd5a6/attachment.html>


More information about the MacRuby-devel mailing list