Coder Social home page Coder Social logo

mmontone / cl-docweaver Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 0.0 1.91 MB

Common Lisp Documentation Weaver

Home Page: https://mmontone.github.io/cl-docweaver/

Common Lisp 99.53% Makefile 0.47%
lisp common-lisp documentation documentation-tool texinfo

cl-docweaver's Introduction

CL-DOCWEAVER

CL-DOCWEAVER is a document weaver for Common Lisp.

Documentation for a Lisp project is written with the user's tool of choice (like Texinfo, Markdown, etc). Then, Common Lisp definitions are expanded into the documentation source using DocWeaver commands.

DOCWEAVER commands give the user control on how definitions are to be expanded, either via command options or by choosing a different set of commands.

CL-DOCWEAVER is easy to extend to support different documentation tools.

Texinfo and Markdown are the ones with best support at this moment.

Usage

Please have a look at the manual.

cl-docweaver command line command

Build the cl-docweaver command line command:

make
sudo make install

After that, cl-docweaver command is available:

cl-docweaver - Common Lisp Documentation Weaver

USAGE: sbcl [OPTIONS] INPUTFILE

Weave Common Lisp documentation in INPUTFILE.

Options:
  --version             display version information and exit
  -h, --help            display help information and exit
  -d, --debug           debug
  -o FILE, --output FILE
                        output file
  -s DOCSYSTEM, --docsystem DOCSYSTEM
                        the documentation system to use. either texinfo or
                        markdown. if not specified, the documentation system
                        used is inferred by looking at input file extension.
  -m MODULES, --modules MODULES
                        the list of modules to REQUIRE
  -c COMMAND-PREFIX, --command-prefix COMMAND-PREFIX
                        the command prefix character to use. Default is @
  --parse-docstrings    When enabled, parse docstrings and format them. This is
                        enabled by default.
  --escape-docstrings   When enabled, escape the docstrings depending on the
                        output. This is enabled by default.

Examples:

  Weave texinfo file and visualize weaved output

      cl-docweaver my-documentation.texi

  Weave texinfo file into a file

      cl-docweaver my-documentation.texi -o my-documentation.weaved.texi

API

DOCWEAVER

  • [function] DOCWEAVER:WEAVE-FILE (file output-file &key docsystem modules command-prefix (parse-docstrings t) (escape-docstrings t))

    Weaves documentation source in FILE and writes the result to OUTPUT-FILE.

    Arguments:

    • DOCSYSTEM : specify the documentation tool that is being used (:texinfo, :markdown, etc.).
    • MODULES : is the list of modules (or ASDF system names) that need to be loaded to be able to read definition descriptions.
    • COMMAND-PREFIX : is the character to use as prefix for commands. The character at is the default.
    • PARSE-DOCSTRINGS : if T, then docstrings are parsed and highlighted and references to code from it created.
    • ESCAPE-DOCSTRINGS: if T, then docstrings are escaped by the documentation system. Escaping allows the use of special documentation system characters in docstring sources. If the escaping of docstrings is turned off, then that allows to use documentation system markup in docstrings. Category: TopLevel
  • [function] DOCWEAVER:DEF-WEAVER-COMMAND-HANDLER (command-name args (&key docsystem) &body body)

    Define a weaver command handler. COMMAND-NAME is the name of the command, without the prefix (like 'clvariable', 'clfunction', etc.) ARGS is the list of arguments for that command in the DOCSYSTEM implementation. DOCSYSTEM is a specializer for the documentation system. For example, (eql :texinfo). BODY should write to an implicit STREAM variable, to expand the command.

    This is implemented as a wraper over PROCESS-WEAVER-COMMAND .

  • [function] DOCWEAVER:PROCESS-WEAVER-COMMAND (docsystem command args stream)

    The generic function to specialize for implementing weaving commands for the different documentation systems.

    See: DEF-WEAVER-COMMAND-HANDLER

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.