Hello,
I need a template system for Plain text (Email), HTML (Web shop) and
Latex (Invoices). Which one would you recommend?
TIA
Andreas
···
–
AVR-Tutorial, über 350 Links
Forum für AVRGCC und MSPGCC
-> http://www.mikrocontroller.net
Hello,
I need a template system for Plain text (Email), HTML (Web shop) and
Latex (Invoices). Which one would you recommend?
TIA
Andreas
–
AVR-Tutorial, über 350 Links
Forum für AVRGCC und MSPGCC
-> http://www.mikrocontroller.net
ERB is a good choice: http://raa.ruby-lang.org/list.rhtml?name=erb
-Jack Herrington
http://www.codegeneration.net
On 5/25/03 4:13 AM, “Andreas Schwarz” usenet@andreas-s.net wrote:
I need a template system for Plain text (Email), HTML (Web shop) and
Latex (Invoices). Which one would you recommend?
Andreas Schwarz wrote:
Hello,
I need a template system for Plain text (Email), HTML (Web shop) and
Latex (Invoices). Which one would you recommend?
I use the Template.rb class from RDoc for all these (and other uses
too). It’s simple, and doesn’t insist on HTML-like tags for markup.
Cheers
Dave
Andreas Schwarz wrote:
Hello,
I need a template system for Plain text (Email), HTML (Web shop) and
Latex (Invoices). Which one would you recommend?TIA
Andreas
how about eruby? I know it mostly aims at sgml documents, but it would
let you embed ruby code into almost any document…
–
dc -e 4ddod3ddn1-0nn1dnd+nn3dn1+n3*1+ddn1+dn2-n5dn1+dnrn1-p | tr
0123456 yorh@k. | dd conv=lcase
Hi.
Do you know amrita - template system for HTML/XML?
http://raa.ruby-lang.org/list.rhtml?name=amrita
If you want to use its approach for e-mail or TeX, try misen.
http://raa.ruby-lang.org/list.rhtml?name=misen
Example 1 (SGML/HTML/XML or various plain text):
#!/usr/bin/env ruby
#--ruby--
require "misen/style"
require “misen/util”
source = '\
misen is text template library like Amrita.
=end ----------------------------------------------------------------#!/usr/bin/env ruby
#--ruby--
require "misen/expand"
require "misen/parse"
require “misen/style-tex”
source = <<‘EOF’
\documentclass{article}
\title{\misen:title}
\begin{document}
\maketitle
\begin{misen:body}
body will be inserted here
\end{misen:body}
\end{document}
EOF
data = {
:title => “hello world”,
:body => “misen is text template library like Amrita.”
}
parsed = Misen.new_parser(Misen::STYLE_TEX).parse_text(source)
printer = Misen::ExpandPrinter.new($stdout)
printer.expand_nodes(parsed, data)
=begin
\documentclass{article}
\title{hello world}
\begin{document}
\maketitle
misen is text template library like Amrita.
\end{document}
–
Shirai,Kaoru shirai@korinkan.co.jp
Korinkan Ltd.
Shirai,Kaoru wrote:
Do you know amrita - template system for HTML/XML?
http://raa.ruby-lang.org/list.rhtml?name=amrita
If you want to use its approach for e-mail or TeX, try misen.
Hmmm, I think that’s a bit oversized and not flexible enough. For
example I have to chop and/or pad strings for e-mail templates; that
would be easy in ERuby, but is it possible with misen?
Anders Borch wrote:
Andreas Schwarz wrote:
Hello,
I need a template system for Plain text (Email), HTML (Web shop) and
Latex (Invoices). Which one would you recommend?TIA
Andreashow about eruby? I know it mostly aims at sgml documents, but it would
let you embed ruby code into almost any document…
Yes, I already thought about it and it seems to be the best solution.
–
AVR-Tutorial, über 350 Links
Forum für AVRGCC und MSPGCC
→ http://www.mikrocontroller.net