Re: [Rest2web-develop] link to my page
Brought to you by:
mjfoord
From: Gael V. <gae...@no...> - 2006-09-24 00:20:55
|
On Sun, Sep 24, 2006 at 12:57:13AM +0100, Michael Foord wrote: > rest2web *outputs* html. I use it enough to know that :->. > >enhanced feature that are special to rest2web. I am mainly thinking of > >the restindex, including in it the figures generated by the script as > >file:foo.png entries in the rest2web or using the {+coloring} macros f= or > >displaying python block. The reason why this idea came to > >my mind is that I am adding pyreport generated files to my site. > So you mean integrating the output of pyreport into rest2web ? If not -= =20 > I still don't understand. Sorry if I'm being dumb. I mean generating a rest2web friendly file. > Providing a mechanism for rest2web to drive pyreport would seem like th= e=20 > ideal way of doing this. > >Your idea, though is interesting. I have not gotten around to have a l= ook > >at how plugins are implemented in rest2web ( I should, I am definitely > >interested ), but this should be really easy if I add a r2w output > >driver. I tried to build pyreport so that it can easily be called fro= m > >other python scripts. If I add a "r2w" output type it would be as easy > >as (with svn version, which is not on the net, mind you) > >import pyreport > >pyreport.main("fileToProcess.py", "-t r2w") > >and you would have a r2w friendly rst file in fileToProcess.txt. > So your idea is that pyreport could generate rest2web source files. I=20 > think I get this. Its exactly it. The more I think about it the more I think that the good way to do this is to have a macro {pyreport;foo.py} that would run foo.py throught pyreport and return rest2web friendly rest syntax. Thus pyreport would be embedded in rest2web. Hum that looks like a promising idea and would profit a to rest2web, although it does add features that intersect with the ability rest2web has to embed python code in a page. > >I like this idea. If you want to add the plugin > I'm over my head in different projects. I could support you in creating= =20 > a plugin - but am unlikely to do it myself. I know what you mean. Well I'll add this to my todo list and see if I get time to do this. > On the other hand - as a plugin, it would be easy to call pyreport and=20 > include the generated html or ReST. You might need to work on a system=20 > for pyreport to either copy the files, or instruct the plugin which=20 > files to copy. > Inside the indextree or other data structures, a page has access to the= =20 > source files and target directories - so this should be easy. > You're thinking of including pyreport with rest2web ? I haven't fully=20 > read up on its capabilities - but that is a very interesting proposal. Well it seems the easiest way to do it, so as not to both spend a lot of time on this. > I'm now in feature freeze for 0.5.0 final - but after that the sky is=20 > the limit. Sure. Hum, it reminds me that I still haven't found a way of passing a relative path to macros like colorize. Currently I have=20 "{colorize;/home/varoquau/www/src/computers/pyreport/latex.py}" in my rest file, and that is very ugly. What is the correct way of doing this (either I am missing something obvious, or it doesn't work on my system). Ga=EBl |