Using amrita for generating static content?

I’m a very happy user of amrita for generating dynamic web content. My
sincere and heartfelt congratulations go to Taku Nakajima for such an
excellently conceived and designed program.

Because I’m so happy using amrita for managing dynamic web content, I’m
wondering if it can also be used just as effectively for generating
static content, in the following manner:

  • I create a lot of html pages with amrita-style “ID=[tag]” attributes
    in places where I want content to be generated by amrita.

  • I run one or more amrita-based ruby programs periodically, giving them
    access to data in a data base, or on the command line, or from
    wherever, as well as pointing them to these amrita-ized html pages.
    The output from this process is a series of generated html files that
    get put on my web site, to be retrieved statically via standard HTTP
    accesses.

I know that there’s nothing about amrita’s design that prevents it being
used this way. However, I’m not sure what, if any dependencies amrita
has on cgi-like paradigms. Does amrita need to get its data via an HTTP
’get’ or ‘post’ method, or can it get its input data any way it wants,
and then use it to drive the HTML generation process?

If amrita needs to be fed by a ‘get’ or ‘post’, I can still put a fake
cgi wrapper around it in order to pass in its input data. However, it
would be better to not have to go through this step.

Does anyone know how easy it would be for me to use amrita in this way?

Thanks in advance.

···


Lloyd Zusman
ljz@asfast.com

Tuesday, December 10, 2002, 9:04:57 PM, Lloyd Zusman wrote:

I’m a very happy user of amrita for generating dynamic web content. My
sincere and heartfelt congratulations go to Taku Nakajima for such an
excellently conceived and designed program.

[big snip]

Does anyone know how easy it would be for me to use amrita in this way?

Hello Lloyd,
I use amrita in a completely static fashion. I just followed
the examples included on the amrita web site.

Chris

···


Chris Grindstaff
chrisg@appliedReasoning.com | www.appliedReasoning.com

[snip]

Does anyone know how easy it would be for me to use amrita in this way?
[snip]

i put together a powerpoint type presentation using amrita not long ago. the
code to generate the slides was really easy to create, and made use of
amrita’s ability to generate content into any object supporting the ‘<<’
operator.

the presentation has a slide about itself located at

http://eli.fsl.noaa.gov/ruby/class/0/presentation/slide.cgi?n=21

if you click on ‘slide.cgi’ you will see an example of using amrita to place
it’s generated content into a string, which could then be printed to a file.
i suppose you could append (<<) directly into the file…

note that the ‘data’ hash could be populated from any conceivable source,
including a database, filesystem, or cgi environment. so it’s absolutely
possible to generate static pages. just don’t populate your page’s variables
from data gotten from the cgi module and you can create static pages.

hope this helps.

-a

···

====================================

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================
SIGSIG – signature too long (core dumped)

Chris Grindstaff chrisg@appliedReasoning.com writes:

Tuesday, December 10, 2002, 9:04:57 PM, Lloyd Zusman wrote:

[ … ]

Does anyone know how easy it would be for me to use amrita in this way?

Hello Lloyd,
I use amrita in a completely static fashion. I just followed
the examples included on the amrita web site.

I must have missed those examples. I’m sorry to have overlooked them
and then posted here.

Thank you.

Off to the amrita site again …

···

Chris

Chris Grindstaff
chrisg@appliedReasoning.com | www.appliedReasoning.com


Lloyd Zusman
ljz@asfast.com

How did you syntax-highlight this page? Could it be done dynamically? I have a
site written with Ruby that I want to display the (current) sources for
without having to manually update anything.

Tim Bates

···

On Wed, 11 Dec 2002 01:46 pm, ahoward wrote:

if you click on ‘slide.cgi’ you will see an example of using amrita to
place it’s generated content into a string, which could then be printed to
a file. i suppose you could append (<<) directly into the file…


tim@bates.id.au

for f in *.rb; do vim -f +“syn on” +“run! syntax/2html.vim” +“wq” +“q” $f; done

may work dynamically (does for me). assuming a current version of vim/gvim.

supposedly it works better with gvim instead of vim - but both work fine for
me…

try

gvim

:help 2html

for more info.

(g)vim never stop amazing me…

-a

···

On Wed, 11 Dec 2002, Tim Bates wrote:

How did you syntax-highlight this page? Could it be done dynamically? I have a
site written with Ruby that I want to display the (current) sources for
without having to manually update anything.

====================================

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================
SIGSIG – signature too long (core dumped)