Skip to main content

Documentation generator for Csound projects

Project description

csdoc

csdoc is a documentation generator for Csound projects. It parses Csound code (.csd, .orc, .inc, etc.) and extracts JSDoc-style comment blocks to generate a beautiful, static HTML documentation site.

Features

  • Standard Syntax: Supports opcode (UDOs), instr, and struct definitions.
  • Recursive Parsing: Automatically follows #include statements.
  • Rich Comments: Supports @param, @return, and Markdown in descriptions.
  • Modern CLI: Easy to use with uv or as a standalone tool.

Installation

You can run csdoc directly using uvx:

uvx --from git+https://github.com/yourusername/csdoc csdoc build main.csd

Or install it in your environment:

pip install csdoc

Usage

Build Documentation

csdoc build <source_file> [options]
  • <source_file>: The entry point of your Csound project (e.g., main.csd).
  • -o, --output <dir>: The directory to save the generated site (default: dist).

Export JSON

csdoc json <source_file>

Documentation Format

csdoc looks for tags within /** ... */ comment blocks immediately preceding a definition.

Example

/**
 * A gain control UDO.
 * 
 * This opcode applies a simple linear gain to an audio signal.
 * 
 * @param ain   The input audio signal
 * @param kgain The gain multiplier (0.0 to 1.0)
 * @return aout  The processed audio signal
 */
opcode Gain, a, ak
  ain, kgain xin
  xout ain * kgain
endop

Supported Tags

Tag Description
@param {type} name Description Documents a parameter or p-field. Type is optional.
@return {type} Description Documents a return value. Type is optional.
@returns Alias for @return.

Descriptions support standard Markdown syntax, including code blocks, bold text, and lists.

Development

This project uses uv for dependency management.

# Install dependencies
uv sync

# Run the CLI
uv run csdoc --help

License

MIT

Project details


Download files

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

Source Distribution

csdoc-0.1.2.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csdoc-0.1.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file csdoc-0.1.2.tar.gz.

File metadata

  • Download URL: csdoc-0.1.2.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for csdoc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6763103e77ef3de3d10e73e1f4efa98b2dbe7565f48b98298bf50521aacc12be
MD5 6725e5cc1f358de6068a497e0f97608f
BLAKE2b-256 9c62921ae391774fa6b2390a4e72be72ae154cb663206ff0723c9b8a67aeac69

See more details on using hashes here.

File details

Details for the file csdoc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: csdoc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for csdoc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cee0b28877e34dc583dcab953dfe16e90797acf790739ab531955376ca293c98
MD5 e1b0db52e144368da92d4eb11b90c314
BLAKE2b-256 baa42fcbe0ba6ce74a7348dce60b2170d502c79606a8fecbeed183ec5cf6e4e4

See more details on using hashes here.

Supported by

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