<div dir="ltr"><div><div><div><div><div><div><div><div>I wonder whether I can use scribble as script a scripting<br>language, to generate html on the fly. Consider the<br></div><div>following minipage:<br></div><div><br><a href="http://advocacia.me/rkt/pages.r">http://advocacia.me/rkt/pages.r</a><br>
<br></div><div>Here is the script that generated it:<br></div><br>#!/usr/bin/env racket/bin/racket<br>#lang racket<br><br>(display (~a "Content-type: text/html<br><br><br><html><br><body><br><h1>Racket for CGI</h1><br>
<p>One often cannot use Racket to<br> serve html pages. Inexpensive<br> hosting services stick to<br> Apache, and that is it.</p><br><br><h2>CGI</h2><br> Let us see how to use CGI from<br> Racket, etc. etc.<br>
<h2>ssh</h2><br> You need to get permission from<br> your hosting service to use ssh.<br> Then create a rkt folder, and<br> give it chmod a+x rkt permission.<br><br> Then create a .htaccess file, and<br> inform Apache abour Racket extensions...<br>
<br> <p>Addhandler .rkt .s .r</p><br><br> <p>And that is all.</p><br></body><br></html><br>"))<br><br></div>If the author of this minipage could write<br>scripts in scribble, it would become something<br>
</div></div>like this:<br><br>#!/usr/bin/env racket/bin/scribble --script<br>#lang scribble/base<br><br><br>@title{Racket for CGI}<br>One often cannot use Racket to<br> serve html pages. Inexpensive<br> hosting services stick to<br>
Apache, and that is it.<br><br></div>@section{CGI}<br> Let us see how to use CGI from<br> Racket, etc. etc.<br><br>@section{ssh}<br> You need to get permission from<br> your hosting service to use ssh.<br> Then create a rkt folder, and<br>
give it chmod a+x rkt permission.<br><br></div>bla, bla, bla...<br><br></div>I guess this feature is very easy to<br></div>implement, and would be appreciated.<br><br></div>