Git Product home page Git Product logo

clj-doc's Introduction

clj-doc

This is a library to help generate documentation from Clojure code to various kind of output formats. Its output can be customized, it can output to multiple files and search for namespace using regular expressions.

The currently supported output formats are:

  • Simple HTML
  • Markdown
  • Creole
  • DokuWiki Syntax

Usage

Normal use of clj-doc is done through two macros, gen-doc and gen-doc-to-file. The later being only a special case of the former with a filename as first argument. They can take an optional option map and a sequence of namespace identifiers that can be grouped with simple collections. To identify the required namespace, you can use symbols or regular expressions. Each regex is expanded into a sequence of namespace symbols.

Examples

Here's some examples to makes things clearer.

Simple Usage

Load clj-doc and generate documentation for the clj-doc.markups.markdown namespace using the default markup which is html-simple.

user> (use 'clj-doc)
user> (gen-doc clj-doc.markups.markdown)

More Complex Ones

Create one file for each one of clj-doc's markup namespaces in files test0.txt to test3.txt.

user> (gen-doc-to-file
        "test.txt"
        {:markup creole
         :separated-by namespace}
        #"clj-doc\.markups\.")

Creates two files, named test0.markdown and test1.markdown, one including all documentation for clj-doc without markdown and html-simple, the other with these two namespaces only.

user> (gen-doc-to-file
        "test.markdown"
        {:markup markdown}
        #"(?=clj-doc)(?=(?!.*markdown))(?=(?!.*html-simple))"
        [clj-doc.markups.markdown clj-doc.markups.html-simple])


Copyright (c)2010 Nicolas Buduroi. All rights reserved.

The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license.

You must not remove this notice, or any other, from this software.

clj-doc's People

Contributors

budu avatar davidsantiago avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.