I've done some more on this, it's now at
http://www.redbrick.dcu.ie/~noel/cclib/ccWeb.py with some discussion
on my blog at:
http://baoilleach.blogspot.com/2007/07/ccweb-lightweight-web-service-for.html
It would be nice to do a web page with a form where you can paste in
the contents of your log file, click SEND, and it will present the
results as a nicely formatted web page. It would also be useful for
asking Orca users, for example, to test out a parser that's in
development.
Regards,
Noel
On 17/07/07, Noel O'Boyle <bao...@gm...> wrote:
> I've got a simple cclib-based webservice running. You can check it out
> by running something like the following script. It doesn't need
> simplejson, but if available, it will use it in preference to 'eval'
> (which can be a security risk).
>
> import urllib
> try:
> import simplejson
> except:
> simplejson = None
>
> data = urllib.urlencode({'logfile': open("dvb_sp.out").read()})
> f = urllib.urlopen("http://www.redbrick.dcu.ie/~noel/cclib/test.py", data)
> if simplejson:
> result = simplejson.loads(f.read())
> else:
> result = eval(f.read())
> print result.keys()
>
> Now you can use cclib even if it isn't installed on your own computer,
> or from a variety of different programming languages. I don't yet deal
> with errors correctly, so don't stress the script too much!
>
> Noel
>
|