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.3.tar.gz (30.0 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.3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csdoc-0.1.3.tar.gz
  • Upload date:
  • Size: 30.0 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.3.tar.gz
Algorithm Hash digest
SHA256 e1e74a4c0008806adadd934eeead700a62db6a3c31d32d7073e86deaecdd0265
MD5 9486468433da9234f350b7f73b50668a
BLAKE2b-256 5e7a4a94d79143c862de0f0d0c06b26fa5a0092dbb306f0139c1b85d14b9c1f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csdoc-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 517fa0e53257880e8c7778728fc57bdbc53f43d5c21af7d1cee51f494ba35d8b
MD5 92075d414e5d87c6e2d828244edf976f
BLAKE2b-256 58067f426afa47effc5046af12d404f1c8038854e560cd38fba35b1db18ce470

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