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.1.tar.gz (21.3 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.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csdoc-0.1.1.tar.gz
  • Upload date:
  • Size: 21.3 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.1.tar.gz
Algorithm Hash digest
SHA256 b9a23d84386d0fe6c0fb9c2bcf3e6d83ad80a39db6734079b821b2018247e2ca
MD5 e519354df67439fcf6707a7b2066701a
BLAKE2b-256 8977b4132b28474a0f52796aaca6765c01404cea14165e26d43307ea5f5586a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csdoc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 242d470533a3d3fe50c4be2602afb0a54abb0dd765d4dfe001d383cf512092d7
MD5 f7ba3e4ffdcd3775e14614245e244f5c
BLAKE2b-256 1885b37ed566dad87323025b0f6df6a843a726e839ea2b58492551d1f39d849d

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