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.4.tar.gz (31.1 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.4-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csdoc-0.1.4.tar.gz
  • Upload date:
  • Size: 31.1 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.4.tar.gz
Algorithm Hash digest
SHA256 eed8e27666db90eef01c556a030e1b16a8e5da74c17213debef597f5e8fed07c
MD5 24744be0555cfb71b688015e9e0f7c96
BLAKE2b-256 ab8e3a54cbf8b5a69ab63a12ead3b8dab13fce2eb3cf5a4023bedcd3dd7c47c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csdoc-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 73d8e0d78060bf0d743d11021094ce6df3b2cb5ccd8e85dea25d8d323f263ed9
MD5 bf9357145889c8ed230ac96e5956119e
BLAKE2b-256 9096b3e84f768104104988bd8e435e2e59fb23610ba1556b34e54372286e6c7f

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