[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] documentation issues...
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] documentation issues... |
Date: |
Thu, 14 Feb 2008 21:27:46 +0100 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Feb 14, 2008 at 02:19:46PM -0600, Jim Ursetto wrote:
> Select all in the preview window, cut and paste to Emacs or Vim, edit, and
> paste the text back to the wiki. I do it all the time, and it solves every one
> of these issues. (Modern browsers handle most of them, too.) You can also use
> `svn up` for the import step, but the preview window is still preferable to
> `svn ci` as you can see the result, unless you're making a small change or
> like
> to live dangerously.
How primitive! :)
I use this little script, I think Mario gave to me.
#!/usr/pkg/bin/csi -s
(use stream-wiki)
(define (read-wiki text)
(with-output-to-string
(lambda ()
(write-stream
(wiki->html
(string->stream text)
stream-null "" (constantly stream-null) (lambda (name tail) tail)
(make-hash-table) (make-html-header 1) (constantly stream-null)
(constantly #t) (make-hash-table)
(lambda (url)
(string-append "?page=" (stream->string url))))))))
(let ((args (command-line-arguments)))
(when (null? args)
(print "usage: wiki2html.scm <wiki file>")
(exit 1))
(print
"<html><head><title></title><meta http-equiv=\"Content-Type\"
content=\"text/html; charset=utf-8\"/><link rel=\"stylesheet\"
type=\"text/css\" href=\"http://galinha.ucpel.tche.br/common-css\"/></meta>"
That way you can generate a simple preview locally. You don't even
need network access if you download the CSS and modify the stylesheet
link.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
pgp5S6s0HMnY_.pgp
Description: PGP signature