Thanks Matthew,

I have two question that I didn't express clearly:
1. A renderer that would create xexpr's for direct consumption of the
racket web server. It sounds like pollen will be perfect! (I quickly
dismissed writing my own wiki-markup renderer on the basis that scribble
already existed)
2. A renderer that would accept a string rather than a path. Both the
scribble and pollen renderers seem to require a path to a file, but I'm
keen to store pages in a database[1].

I think you have solved (1) thanks! - do you have any suggestions for (2)?

I have another concern that I haven't thought through...can I (should I)
enable users to enter executable code - I quite like the idea though it
obviously holds risks :)

Kind regards,

Stephen


[1] as an alternative I could just store my wiki pages as text files in a
git repository and get history for free but I wanted to keep it simple.

On Wed, 4 Nov 2015 at 02:27, Matthew Butterick <chronf...@gmail.com> wrote:

> I found this task challenging too, so I made a Scribble-derived DSL that's
> natively oriented toward making X-expressions, for instance:
>
>
> #lang pollen/markup
>
> ◊title{Bottles --- ◊italic{Abridged}}
>
> ◊(apply itemlist
>   (for/list ([n (in-range 100 0 -1)])
>     ◊item{◊(format "~a" n) bottles.}))
>
>
>
>
>
> On Tuesday, November 3, 2015 at 4:08:01 PM UTC-8, spdegabrielle wrote:
> > Hi,
> >
> > is there a way to to generate xexprs for consumption of the web server
> >
> > I thought making a simple wiki with scribble as the syntax might be fun,
> but I'm tripping at this first hurdle  i.e. (scribblestring->xexpr
> a-string) ->xexpr
> >
> > Any suggestions appreciated
> >
> > Stephen
> >
> >
> > #lang racket
> > (require scribble/decode)
> > (require scribble/render)
> > ;(require scribble/html-render)
> > ;(require scribble/text-render)
> > (require scribble/markdown-render)
> >
> > (define a
> >   "@title{Bottles --- @italic{Abridged}}
> > @(apply itemlist
> >   (for/list ([n (in-range 100 0 -1)])
> >     @item{@(format \"~a\" n) bottles.}))")
> > a
> >
> > (render (list (decode (decode-string a))) (list
> "/Users/spdegarielle/Desktop/")       #:render-mixin render-mixin )
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to