> As Markup already provides much of the functionality needed for > general-purpose templating (not just XML-based templating), it > should be possible to reuse this to create a very simple > text-based template engine, for those cases where you need to > generate plain text, and using a package such as Cheetah may be > overkill.
The ticket has a patch that implements that goal pretty much completely AFAICT:
That's an implementation of a simple yet powerful text-based template engine in under 100 lines. That's possible because it reuses all the functionality already provided in Markup for XML-based templating: directives, expression evaluation, and the processing model in general. It's not as powerful as Cheetah et al, but for generating simple stuff like plain text mail it should work okay, and you don't have to relearn much as a template author.
I personally think it would be a good idea to include that feature in Markup. But that would bring up the dreaded naming question again... Including text-based templating in a package called "Markup" (or PyMarkup) just doesn't make a lot of sense. Ah well... :-P
For me, your timing is perfect, I was about to start looking at text templates to compliment my kid templates. Now, I won't even look. This should satisfy my needs.
I wonder if this would change the BDFL's opinion on kid/markup?
BTW, is that an extraneous "#endif" at the end of the doctest. Does that cause the final <BLANKLINE>?
> > As Markup already provides much of the functionality needed for > > general-purpose templating (not just XML-based templating), it > > should be possible to reuse this to create a very simple > > text-based template engine, for those cases where you need to > > generate plain text, and using a package such as Cheetah may be > > overkill.
> The ticket has a patch that implements that goal pretty much > completely AFAICT:
> That's an implementation of a simple yet powerful text-based template > engine in under 100 lines. That's possible because it reuses all the > functionality already provided in Markup for XML-based templating: > directives, expression evaluation, and the processing model in > general. It's not as powerful as Cheetah et al, but for generating > simple stuff like plain text mail it should work okay, and you don't > have to relearn much as a template author.
> I personally think it would be a good idea to include that feature in > Markup. But that would bring up the dreaded naming question again... > Including text-based templating in a package called "Markup" (or > PyMarkup) just doesn't make a lot of sense. Ah well... :-P
> > As Markup already provides much of the functionality needed for > > general-purpose templating (not just XML-based templating), it > > should be possible to reuse this to create a very simple > > text-based template engine, for those cases where you need to > > generate plain text, and using a package such as Cheetah may be > > overkill.
On 9/5/06, Christopher Lenz <cml...@gmx.de> wrote:
> But that would bring up the dreaded naming question again... > Including text-based templating in a package called "Markup" (or > PyMarkup) just doesn't make a lot of sense. Ah well... :-P
I approve any additions that cause a change in the current project name. :P
Snarkiness aside, I don't really expect to ever have to use this. As long as you can't mix the text directives with template tags, I don't have a problem with it.
On 9/5/06, Christopher Lenz <cml...@gmx.de> wrote:
> I personally think it would be a good idea to include that feature in > Markup. But that would bring up the dreaded naming question again... > Including text-based templating in a package called "Markup" (or > PyMarkup) just doesn't make a lot of sense. Ah well... :-P
How about XmlDoesntSuckButYouCanUseTextOnlyAnyhowWhenYouNeedTo (or XDSBYCUTOAWY for short)?
> For me, your timing is perfect, I was about to start looking at text > templates to compliment my kid templates. Now, I won't even look. > This should satisfy my needs.
Yeah, I think for simple use cases this should work pretty well.
The motivation for this, just as for Markup in general, was Trac, where we currently have the following rather ugly template in the Markup branch:
> On 9/5/06, Christopher Lenz <cml...@gmx.de> wrote: >> I personally think it would be a good idea to include that feature in >> Markup. But that would bring up the dreaded naming question again... >> Including text-based templating in a package called "Markup" (or >> PyMarkup) just doesn't make a lot of sense. Ah well... :-P
> How about XmlDoesntSuckButYouCanUseTextOnlyAnyhowWhenYouNeedTo (or > XDSBYCUTOAWY for short)?
:-D
> How about faux latin: Templatus
Along those lines, Talin suggested "Papyrus". See also <http:// markup.edgewall.org/wiki/NameSuggestions>.
How about about names revolving around the meme of "weaving text"? "texere", "texture", "textyr"... not 100% happy with those, though.
> Am 05.09.2006 um 21:50 schrieb Kevin Dangoor: >> On 9/5/06, Christopher Lenz <cml...@gmx.de> wrote: >>> I personally think it would be a good idea to include that >>> feature in >>> Markup. But that would bring up the dreaded naming question again... >>> Including text-based templating in a package called "Markup" (or >>> PyMarkup) just doesn't make a lot of sense. Ah well... :-P
>> How about XmlDoesntSuckButYouCanUseTextOnlyAnyhowWhenYouNeedTo (or >> XDSBYCUTOAWY for short)?
> :-D
>> How about faux latin: Templatus
> Along those lines, Talin suggested "Papyrus". See also <http:// > markup.edgewall.org/wiki/NameSuggestions>.
> How about about names revolving around the meme of "weaving text"? > "texere", "texture", "textyr"... not 100% happy with those, though.
It all depends on how search engine friendly you want to be. Becoming the first hit on Google for Papyrus would take a bit of time (though I'd imagine "python papyrus" would pretty quickly resolve). Templatus would very quickly converge, as would the others.
You might try plugging some things into nameboy and see if anything grabs you:
> On Sep 5, 2006, at 5:44 PM, Christopher Lenz wrote: >> Along those lines, Talin suggested "Papyrus". See also <http:// >> markup.edgewall.org/wiki/NameSuggestions>.
>> How about about names revolving around the meme of "weaving text"? >> "texere", "texture", "textyr"... not 100% happy with those, though.
> It all depends on how search engine friendly you want to be. Becoming > the first hit on Google for Papyrus would take a bit of time (though > I'd imagine "python papyrus" would pretty quickly resolve). Templatus > would very quickly converge, as would the others.
Yeah, having a name that, when combined with "python", comes out prominently in a Google search isn't hard. The Markup site is already #1 for "markup python", "markup template", and "markup toolkit", for example.
I'm not terribly fond of "Templatus" though :-P
Jeroen Ruigrok suggested "Genshi" via IRC, which is Japanese for "thread for weaving", as in "Genshi is your thread for weaving web pages etc". I'm starting to really like the name, also because of the "gen" part which associates nicely with "generation"/"generator".
Another idea I had was "Kydd", i.e. emphasizing the Kid heritage but twisting the name a bit.
On 9/6/06, Christopher Lenz <cml...@gmx.de> wrote:
> I'm not terribly fond of "Templatus" though :-P
That's fine. Neither am I :)
> Jeroen Ruigrok suggested "Genshi" via IRC, which is Japanese for > "thread for weaving", as in "Genshi is your thread for weaving web > pages etc". I'm starting to really like the name, also because of the > "gen" part which associates nicely with "generation"/"generator".
I like Genshi, except there's a web design company called Genshi Media Group. While no one is likely to confuse a template engine with a web design company, they may be too close for comfort in the eyes of trademark law... (of course, which country's trademark laws then becomes a question, but I personally try to sidestep all such issues by just using an original name).
> Another idea I had was "Kydd", i.e. emphasizing the Kid heritage but > twisting the name a bit.
I don't like this one, because it's phonetically the same as Kid.
> On 9/6/06, Christopher Lenz <cml...@gmx.de> wrote: > > I'm not terribly fond of "Templatus" though :-P
> That's fine. Neither am I :)
> > Jeroen Ruigrok suggested "Genshi" via IRC, which is Japanese for > > "thread for weaving", as in "Genshi is your thread for weaving web > > pages etc". I'm starting to really like the name, also because of the > > "gen" part which associates nicely with "generation"/"generator".
> I like Genshi, except there's a web design company called Genshi Media > Group. While no one is likely to confuse a template engine with a web > design company, they may be too close for comfort in the eyes of > trademark law... (of course, which country's trademark laws then > becomes a question, but I personally try to sidestep all such issues > by just using an original name).
> > Another idea I had was "Kydd", i.e. emphasizing the Kid heritage but > > twisting the name a bit.
> I don't like this one, because it's phonetically the same as Kid.
Kevin Dangoor wrote: > On 9/6/06, Christopher Lenz <cml...@gmx.de> wrote: > > I'm not terribly fond of "Templatus" though :-P
> That's fine. Neither am I :)
> > Jeroen Ruigrok suggested "Genshi" via IRC, which is Japanese for > > "thread for weaving", as in "Genshi is your thread for weaving web > > pages etc". I'm starting to really like the name, also because of the > > "gen" part which associates nicely with "generation"/"generator".
> I like Genshi, except there's a web design company called Genshi Media > Group. While no one is likely to confuse a template engine with a web > design company, they may be too close for comfort in the eyes of > trademark law... (of course, which country's trademark laws then > becomes a question, but I personally try to sidestep all such issues > by just using an original name).
> On 9/6/06, Christopher Lenz <cml...@gmx.de> wrote: >> Jeroen Ruigrok suggested "Genshi" via IRC, which is Japanese for >> "thread for weaving", as in "Genshi is your thread for weaving web >> pages etc". I'm starting to really like the name, also because of the >> "gen" part which associates nicely with "generation"/"generator".
> I like Genshi, except there's a web design company called Genshi Media > Group. While no one is likely to confuse a template engine with a web > design company, they may be too close for comfort in the eyes of > trademark law... (of course, which country's trademark laws then > becomes a question, but I personally try to sidestep all such issues > by just using an original name).
I *think* there would be enough distinction between the two that that shouldn't be a problem.
Genshi is really growing on me. I've created some mockup logos here:
I'm +1 on Genshi pronounced "Jen - she" so it sounds like generate instead of "Gaen - she" as I suspect it is pronounced in Japanese.
However, on the logo, my preference would be to stay away from the Japanese lettering and go with a weave look. I've seen several instances where foreign symbols/names were used and had alternate connotation or similarity to something pejorative, to know to be very careful. At the very least, we should get some input from a true native. I like the weave idea better anyway.
On 9/7/06, Larry Maccherone <LMaccher...@yahoo.com> wrote:
> I'm +1 on Genshi pronounced "Jen - she" so it sounds like generate > instead of "Gaen - she" as I suspect it is pronounced in Japanese.
Hmm... if the Japanese would be pronounced "Gaen-she", I would think we should either pronounce it that way or spell it differently. Otherwise, some fraction of the users will be mispronouncing it and would even have a good reason to do so!
Larry Maccherone wrote: > However, on the logo, my preference would be to stay away from the > Japanese lettering and go with a weave look. I've seen several > instances where foreign symbols/names were used and had alternate > connotation or similarity to something pejorative, to know to be very > careful. At the very least, we should get some input from a true > native. I like the weave idea better anyway.
I verified with Japanese friends of mine.
The only references I could find for 原糸 is a thread used for weaving, most likely inspired from 絹糸 (kenshi) which means silk thread.
I verified this with Chinese, but they don't know any compound like 原糸 as far as I could find. Also could not find anything in a Cantonese dictionary.
And the pronunciation is gen-shi, where gen sounds like get, and shi like she.
> I'm +1 on Genshi pronounced "Jen - she" so it sounds like generate > instead of "Gaen - she" as I suspect it is pronounced in Japanese.
We can add a pronunciation FAQ entry, but I think we should go with the actual pronunciation "gen-she". Shouldn't discriminate against those who know the correct pronunciation ;-)
> However, on the logo, my preference would be to stay away from the > Japanese lettering and go with a weave look. I've seen several > instances where foreign symbols/names were used and had alternate > connotation or similarity to something pejorative, to know to be very > careful. At the very least, we should get some input from a true > native. I like the weave idea better anyway.
According to Jeroen it should be pretty safe. He also commented on IRC: "the kanji even clarifies it is about the thread, since there's a bunch of genshi pronunciations for various kanji combinations".
If we were to use some kind of thread/weaving graphic (IIUC), someone needs to draw that... that's definitely beyond my artistic capabilities :-P