From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francesco Salvestrini Newsgroups: gmane.lisp.guile.user Subject: Re: scheme -> (X)HTML Date: Mon, 31 Mar 2008 22:33:43 +0200 Message-ID: <200803312233.43660.salvestrini@gmail.com> References: <20080325193702.6B6AE94049@webmail220.herald.ox.ac.uk> <2bc5f8210803251253p6f07911brcceaa1cc2bf949c1@mail.gmail.com> <47F1142B.302@bioch.ox.ac.uk> Reply-To: salvestrini@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206995702 1113 80.91.229.12 (31 Mar 2008 20:35:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Mar 2008 20:35:02 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Mar 31 22:35:32 2008 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JgQj0-000592-T8 for guile-user@m.gmane.org; Mon, 31 Mar 2008 22:35:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgQiO-0001UV-QN for guile-user@m.gmane.org; Mon, 31 Mar 2008 16:34:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JgQiL-0001Th-Gq for guile-user@gnu.org; Mon, 31 Mar 2008 16:34:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JgQiK-0001T4-UP for guile-user@gnu.org; Mon, 31 Mar 2008 16:34:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgQiK-0001Si-Md for guile-user@gnu.org; Mon, 31 Mar 2008 16:34:44 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.158]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JgQiK-0001xD-8h for guile-user@gnu.org; Mon, 31 Mar 2008 16:34:44 -0400 Original-Received: by fg-out-1718.google.com with SMTP id d23so2291726fga.30 for ; Mon, 31 Mar 2008 13:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=gyUUkZTbYVuEbRiqZ1i072+3R0iDGEio0jASHWn+oBg=; b=hiIDmCDMrrGW31tYrYV+Pe1b7ND15BVB8vIeqP4bmTat4iMJ3IDTJmy96eovKnDH8rqFhIwBPfxf4tuajnXjTUJSwRu3c/K5TpvTf4c4qm9NG7qE1fcRyNDFYjVjcJPkHq6MZWv4qORMnmammqtdfsielUY4Ol7sWLD/Vkf5Lxk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=from:reply-to:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=Hxb/9d+AYwdjoAQ7AczTcfmWdRltesofRMOGgjVPGglINSb61d+QI5syKc5VSH/m4T9R/gpFRutVqcntLTeObMMy8X7iwOcAHfrT1olsz1XkVELXwYKrqYENIHsLP2TULDmYQHm96d/B7d66wmrmHCjrhOpxhgDNHpZM2RyMMjA= Original-Received: by 10.82.158.12 with SMTP id g12mr5154812bue.39.1206995681417; Mon, 31 Mar 2008 13:34:41 -0700 (PDT) Original-Received: from ?192.168.0.2? ( [87.13.177.141]) by mx.google.com with ESMTPS id e11sm6165176fga.5.2008.03.31.13.34.38 (version=SSLv3 cipher=OTHER); Mon, 31 Mar 2008 13:34:40 -0700 (PDT) User-Agent: KMail/1.9.7 In-Reply-To: <47F1142B.302@bioch.ox.ac.uk> Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6508 Archived-At: Hi Paul, Sorry for bothering you off the list but I've hit some troubles with guile mailing lists lately so I'm writing to you directly. There's a package I've put on savannah that uses SXML (via guile) in order to build HTML. Maybe it could be of some help to you. This is its main URL: http://www.nongnu.org/sitetool Maybe it worth a look. NOTE: It is in its early stage of development so do not expect too much ;-) Cheers, Francesco On Monday 31 March 2008, Paul Emsley wrote: > Julian Graham wrote: > > On Tue, Mar 25, 2008 at 3:37 PM, Paul Emsley 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. -- Fairlight: udp is the light margarine of tcp/ip transport protocols :) -- Seen on #Linux