unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Paul Emsley <paul.emsley@bioch.ox.ac.uk>
To: guile-user@gnu.org
Subject: Re: scheme -> (X)HTML
Date: Mon, 31 Mar 2008 17:41:15 +0100	[thread overview]
Message-ID: <47F1142B.302@bioch.ox.ac.uk> (raw)
In-Reply-To: <2bc5f8210803251253p6f07911brcceaa1cc2bf949c1@mail.gmail.com>


Julian Graham wrote:
> On Tue, Mar 25, 2008 at 3:37 PM, Paul Emsley <paul.emsley@bioch.ox.ac.uk> wrote:
>
>   
>>  Dear Guilers,
>>
>>  I have in mind to write a little script that makes a web page about the state of
>>  various files.
>>
>>  I'd like to use some schemey way of doing this.  s-expression -> HTML perhaps.
>>
>>  What is the thinking guile-user's way of approaching this?
>>     
>
> Hi Paul,
>
> There are several good tools out there for doing this: Oleg Kiselyov
> has written a Scheme-based port of SAX called SSAX [1] that can read
> and emit S-expressions in a format he calls SXML.  It's available for
> Guile as part of Andy Wingo's guile-lib [2].  For permissive HTML
> parsing, Neil Van Dyke has written HtmlPrag [3].  And if you're
> interested in a more DOM-based approach, I've got a module called SDOM
> [4].
>
> Hope that helps!
>
> Regards,
> Julian
>
>
> [1]: http://okmij.org/ftp/Scheme/SXML.html
> [2]: http://home.gna.org/guile-lib/
> [3]: http://www.neilvandyke.org/htmlprag/
> [4]: http://www.nongnu.org/sdom/
>
>   

Hi Julian,

Thank you and others for replying to my query.

I looked at [1] and [2] in your list - I didn't want to parse XML - not 
yet anyway.

Trying [1] I found that Oleg made me jump through hoops with his 
idiosyncratically organised
web pages.  That put me off a bit.  When I tried his code, it was not 
clear to me where the output
was going.  So I tried [2].  I ended up using [2] because I like reading 
Andy Wingo's blog and
it just worked out of the box anyway.

It was such fun!  I've not quasiquoted so deeply before. I'm still 
tinkering with the script - I use
it to see how my hetrogeneous overnight builds got on.

code here:
http://coot.googlecode.com/svn/trunk/build-web-page-builder.scm
results here:
http://www.ysbl.york.ac.uk/~emsley/coot/build-info.html

(Incidentally, the FC3 build seems to fail because guile-gtk-2.1 fails 
to build (it fails in make, not
configure.  Is guile-gtk-2.1 supposed to work on gtk+-2.4?  ... not 
completely the right place to
ask, I guess).

I have a question about the output.  How do I put line breaks into the 
generated text?  All on one
line is fine for my browser - but makes it hard to eyeball the HTML.

After I wrote it (and saw how concise the sxml translator was), I though 
"so what's all the fuss
about PHP?" One of the major things, perhaps, is the generation of 
images in-line.  So I thought
"couldn't guile+sxml do something similar making SVGs on the fly?"  Is 
that being quietly coded
up by someone? Making a few graphs on the fly shouldn't be so hard, 
should it?  In fact, I was
even thinking of doing it myself :)

Regards,

Paul.






  parent reply	other threads:[~2008-03-31 16:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 19:37 scheme -> (X)HTML Paul Emsley
2008-03-25 19:53 ` Julian Graham
2008-03-25 20:38   ` Neil Jerram
2008-06-13 20:53     ` Sebastian Tennant
2008-06-16 21:15       ` Neil Jerram
2008-06-21  9:11         ` Sebastian Tennant
2008-07-03 22:32           ` Neil Jerram
2008-03-31 16:41   ` Paul Emsley [this message]
2008-03-31 20:33     ` Francesco Salvestrini
2008-04-02 11:42       ` Thien-Thi Nguyen
2008-03-25 20:49 ` Francesco Salvestrini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47F1142B.302@bioch.ox.ac.uk \
    --to=paul.emsley@bioch.ox.ac.uk \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).