(missing)
(missing)
Re: Proposal to add HTML class attributes to SRFIs to aid machine-parsing Marc Nieper-Wißkirchen (06 Mar 2019 10:12 UTC)
Re: Proposal to add HTML class attributes to SRFIs to aid machine-parsing Lassi Kortela (07 Mar 2019 10:59 UTC)
(missing)

Re: Proposal to add HTML class attributes to SRFIs to aid machine-parsing Lassi Kortela 07 Mar 2019 10:59 UTC

> What about this approach:

OK, I converted all of SRFI 1 using this tool! Code and output here:
<https://github.com/lassik/srfi-markup-proposal/tree/master/arglist-generator>

These are the raw S-expressions it finds from the HTML:
<https://github.com/lassik/srfi-markup-proposal/blob/master/arglist-generator/srfi-1.text>

And this is the parsed output that it generates from those:
<https://github.com/lassik/srfi-markup-proposal/blob/master/arglist-generator/srfi-1.lisp>

The output entries look like this:

     (procedure iota
       (arg count)
       (arg start optional)
       (arg step optional))
       (return list))

All I had to do to the HTML was to add "proc def" classes to some <dt>
tags. And to add </dt> closing tags for them - otherwise BeautifulSoup
would get confused. This could be fixed by using another tagsoup library
or manually cutting off all subtags after a <dt> or <dd>.