chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] hahn/salmonella issues


From: Evan Hanson
Subject: Re: [Chicken-users] hahn/salmonella issues
Date: Wed, 6 Feb 2019 14:01:28 +1300

Hi Heinz,

On 2019-02-05 16:09, lundi wrote:
> > $ cat file.scm | sed 's/^[ \t]+//' | grep -e "^;;;" | cut -b 5- > file.wiki
> 
> I considered writing documenting comments in Markdown and then pipe those
> through markdown-svnwiki, but I feel like there's little benefit over just
> writing comments directly in svnwiki syntax.
> 
> Obviously there's a lot of room for improvement here. For instance it would
> be great to have a way of automatically converting procedure definitions
> into <procedure>(fn args) blocks.

I hesitate to mention this since I'm pretty sure I'm the only person who
uses it, so it hasn't really been battle-tested (and it's not really
documented either), but the schematic egg might do what you're looking for.

In particular, the `schematic-wiki' program will generate svnwiki tags
for commented (toplevel) procedure definitions, with each tag followed
by the comment. So, if you use svnwiki syntax for the comments, the
result could be copied into a wiki page without any changes:

    # chicken-install schematic
    $ schematic-wiki -c ";;;" < file.scm

There's also a program called `schematic-extract' that generates
S-expressions instead of text, which you could post-process somehow.
There are some details about the expression format here:

  https://git.foldling.org/schematic.git/tree/0.2.1/schematic-extract.1.md

These are also available as library procedures, but again that's totally
undocumented (the irony, I know)... Ping me if you end up using this and
I'll try to help.

All the best,

Evan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]