I've mostly seen the reverse approach. For example, I convert shpaml to django,
then render the django. This makes sense in the django world, because it's
pretty easy for shpaml to detect parts of the document that are django and just
leave them alone. With mako, that's not so easy, as mako allows for more use of
inline Python blocks. So I think your approach makes sense.
Shpaml's pretty fast, because it doesn't do a whole heck of a lot. On my Mac I
see that it can process about 20,000 lines per second. (It's a 2.66 GHz Intel
Core 2 Duo.)
2011/2/17 机械唯物主义linjunhalida <linjun...@gmail.com>:
----- Original Message ----
> From: 机械唯物主义linjunhalida <linjun...@gmail.com>
> To: shpaml <shp...@googlegroups.com>
> Sent: Wed, February 16, 2011 6:21:51 PM
> Subject: Re: shpaml + pyramid + mako
>
> and there is another issue:
>
> when I need import some text in mako like:
> <textarea name="body" rows="10" cols="60">
> ${page.data}
> </textarea>
>
> shpaml's grammar don't have block text quote...
>
> so looks like text -> shpaml -> mako is the better solution?
>
It probably make sense to do it that way.
Later versions of shpaml support the "VERBATIM" keyword, which might solve your
problem:
import shpaml
test = '''
blockquote VERBATIM
Here we are with
some text that is indented, and
we want
sphaml to just let it pass through
p
Back to the normal mode of shpaml.
'''
print shpaml.convert_text(test)
---
<blockquote>
Here we are with
some text that is indented, and
we want
sphaml to just let it pass through
</blockquote>
<p>
Back to the normal mode of shpaml.
</p>
2011/2/17 Erez <ere...@gmail.com>: