Skip to main content

A processor to generate Markdown code documentation from OpenSCAD source comments.

Project description

This package generates wiki-ready GitHub flavored markdown documentation pages from in-line source code comments. This is similar to Doxygen or JavaDoc, but designed for use with OpenSCAD code. Example images can be generated automatically from short example scripts.

Documentation about how to add documentation comments to OpenSCAD code can be found at https://github.com/revarbat/openscad_docsgen/blob/main/WRITING_DOCS.md

Installing openscad-docsgen

The easiest way to install this is to use pip:

% pip3 install openscad-docsgen

To install directly from these sources, you can instead do:

% python3 setup.py build install

Using openscad-docsgen

The simplest way to generate documentation is:

% openscad-docsgen -m *.scad

Which will read all of .scad files in the current directory, and writes out documentation to the ./docs/ dir. To write out to a different directory, use the -D argument:

% openscad-docsgen -D wikidir -m *.scad

To write out an alphabetical function/module index markdown file, use the -i flag:

% openscad-docsgen -i *.scad

To write out a Table of Contents markdown file, use the -t flag:

% openscad-docsgen -t *.scad

To write out a CheatSheet markdown file, use the -c flag:

% openscad-docsgen -c *.scad

You can just test for script errors more quickly with the -T flag (for test-only):

% openscad-docsgen -T *.scad

Configuration File

You can also make more persistent configurations by putting a .openscad_docsgen_rc file in the directory you will be running openscad-docsgen from. It can look something like this:

DocsDirectory: WikiDir/
IgnoreFiles:
  foo.scad
  std.scad
  version.scad
  tmp_*.scad
PrioritizeFiles:
  First.scad
  Second.scad
  Third.scad
  Fourth.scad
DefineHeader(BulletList): Side Effects
DefineHeader(Table:Anchor Name|Position): Extra Anchors

For an explanation of the syntax and the specific headers, see: https://github.com/revarbat/openscad_docsgen/blob/main/WRITING_DOCS.md

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

openscad_docsgen-1.1.10-py2.py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page