csdoc 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
csdoc-0.1.0/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ .venv/
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+
10
+ # Csound outputs
11
+ *.wav
12
+ *.aif
13
+ *.ogg
14
+ *.mp3
15
+
16
+ # Project specific
17
+ .DS_Store
csdoc-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.4
2
+ Name: csdoc
3
+ Version: 0.1.0
4
+ Summary: Documentation generator for Csound projects
5
+ Project-URL: Homepage, https://github.com/kunstmusik/csdoc
6
+ Project-URL: Repository, https://github.com/kunstmusik/csdoc
7
+ Project-URL: Bug Tracker, https://github.com/kunstmusik/csdoc/issues
8
+ Author-email: Steven Yi <stevenyi@gmail.com>
9
+ License-Expression: MIT
10
+ Keywords: audio,csound,documentation,music
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Python: >=3.13
16
+ Requires-Dist: jinja2>=3.1.6
17
+ Requires-Dist: markdown>=3.10.1
18
+ Requires-Dist: typer>=0.21.1
19
+ Description-Content-Type: text/markdown
20
+
21
+ # csdoc
22
+
23
+ `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.
24
+
25
+ ## Features
26
+
27
+ - **Standard Syntax**: Supports `opcode` (UDOs), `instr`, and `struct` definitions.
28
+ - **Recursive Parsing**: Automatically follows `#include` statements.
29
+ - **Rich Comments**: Supports `@param`, `@return`, and Markdown in descriptions.
30
+ - **Modern CLI**: Easy to use with `uv` or as a standalone tool.
31
+
32
+ ## Installation
33
+
34
+ You can run `csdoc` directly using `uvx`:
35
+
36
+ ```bash
37
+ uvx --from git+https://github.com/yourusername/csdoc csdoc build main.csd
38
+ ```
39
+
40
+ Or install it in your environment:
41
+
42
+ ```bash
43
+ pip install csdoc
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ### Build Documentation
49
+
50
+ ```bash
51
+ csdoc build <source_file> [options]
52
+ ```
53
+
54
+ - `<source_file>`: The entry point of your Csound project (e.g., `main.csd`).
55
+ - `-o, --output <dir>`: The directory to save the generated site (default: `dist`).
56
+
57
+ ### Export JSON
58
+
59
+ ```bash
60
+ csdoc json <source_file>
61
+ ```
62
+
63
+ ## Documentation Format
64
+
65
+ `csdoc` looks for tags within `/** ... */` comment blocks immediately preceding a definition.
66
+
67
+ ### Example
68
+
69
+ ```csound
70
+ /**
71
+ * A gain control UDO.
72
+ *
73
+ * This opcode applies a simple linear gain to an audio signal.
74
+ *
75
+ * @param ain The input audio signal
76
+ * @param kgain The gain multiplier (0.0 to 1.0)
77
+ * @return aout The processed audio signal
78
+ */
79
+ opcode Gain, a, ak
80
+ ain, kgain xin
81
+ xout ain * kgain
82
+ endop
83
+ ```
84
+
85
+ ### Supported Tags
86
+
87
+ | Tag | Description |
88
+ | --- | --- |
89
+ | `@param {type} name Description` | Documents a parameter or p-field. Type is optional. |
90
+ | `@return {type} Description` | Documents a return value. Type is optional. |
91
+ | `@returns` | Alias for `@return`. |
92
+
93
+ Descriptions support standard **Markdown** syntax, including code blocks, bold text, and lists.
94
+
95
+ ## Development
96
+
97
+ This project uses `uv` for dependency management.
98
+
99
+ ```bash
100
+ # Install dependencies
101
+ uv sync
102
+
103
+ # Run the CLI
104
+ uv run csdoc --help
105
+ ```
106
+
107
+ ## License
108
+
109
+ MIT
@@ -0,0 +1,41 @@
1
+ # Publishing csdoc to PyPI
2
+
3
+ ## Prerequisites
4
+
5
+ 1. **PyPI Account**: You must have an account on [PyPI](https://pypi.org/).
6
+ 2. **API Token**: Create an API token on PyPI.
7
+ * Go to **Account Settings** -> **API Tokens**.
8
+ * Create a new token (scope it to "Entire account" if `csdoc` doesn't exist yet, or just for `csdoc` if it does).
9
+ * **Copy the token** (it starts with `pypi-`).
10
+
11
+ ## Publishing with `uv` (Recommended)
12
+
13
+ Since this project uses `uv`, you can publish directly with it.
14
+
15
+ 1. **Build the package**:
16
+ ```bash
17
+ uv build
18
+ ```
19
+ This creates `dist/csdoc-0.1.0.tar.gz` and `dist/csdoc-0.1.0-py3-none-any.whl`.
20
+
21
+ 2. **Publish**:
22
+ ```bash
23
+ uv publish --token <your-pypi-token>
24
+ ```
25
+ * Replace `<your-pypi-token>` with your actual token.
26
+ * Alternatively, set the `UV_PUBLISH_TOKEN` environment variable.
27
+
28
+ ## Publishing with `twine` (Alternative)
29
+
30
+ If you prefer standard tools:
31
+
32
+ 1. Install twine:
33
+ ```bash
34
+ uv pip install twine # or pip install twine
35
+ ```
36
+
37
+ 2. Upload:
38
+ ```bash
39
+ twine upload dist/*
40
+ ```
41
+ You will be prompted for your username (`__token__`) and password (the API token).
csdoc-0.1.0/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # csdoc
2
+
3
+ `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.
4
+
5
+ ## Features
6
+
7
+ - **Standard Syntax**: Supports `opcode` (UDOs), `instr`, and `struct` definitions.
8
+ - **Recursive Parsing**: Automatically follows `#include` statements.
9
+ - **Rich Comments**: Supports `@param`, `@return`, and Markdown in descriptions.
10
+ - **Modern CLI**: Easy to use with `uv` or as a standalone tool.
11
+
12
+ ## Installation
13
+
14
+ You can run `csdoc` directly using `uvx`:
15
+
16
+ ```bash
17
+ uvx --from git+https://github.com/yourusername/csdoc csdoc build main.csd
18
+ ```
19
+
20
+ Or install it in your environment:
21
+
22
+ ```bash
23
+ pip install csdoc
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ### Build Documentation
29
+
30
+ ```bash
31
+ csdoc build <source_file> [options]
32
+ ```
33
+
34
+ - `<source_file>`: The entry point of your Csound project (e.g., `main.csd`).
35
+ - `-o, --output <dir>`: The directory to save the generated site (default: `dist`).
36
+
37
+ ### Export JSON
38
+
39
+ ```bash
40
+ csdoc json <source_file>
41
+ ```
42
+
43
+ ## Documentation Format
44
+
45
+ `csdoc` looks for tags within `/** ... */` comment blocks immediately preceding a definition.
46
+
47
+ ### Example
48
+
49
+ ```csound
50
+ /**
51
+ * A gain control UDO.
52
+ *
53
+ * This opcode applies a simple linear gain to an audio signal.
54
+ *
55
+ * @param ain The input audio signal
56
+ * @param kgain The gain multiplier (0.0 to 1.0)
57
+ * @return aout The processed audio signal
58
+ */
59
+ opcode Gain, a, ak
60
+ ain, kgain xin
61
+ xout ain * kgain
62
+ endop
63
+ ```
64
+
65
+ ### Supported Tags
66
+
67
+ | Tag | Description |
68
+ | --- | --- |
69
+ | `@param {type} name Description` | Documents a parameter or p-field. Type is optional. |
70
+ | `@return {type} Description` | Documents a return value. Type is optional. |
71
+ | `@returns` | Alias for `@return`. |
72
+
73
+ Descriptions support standard **Markdown** syntax, including code blocks, bold text, and lists.
74
+
75
+ ## Development
76
+
77
+ This project uses `uv` for dependency management.
78
+
79
+ ```bash
80
+ # Install dependencies
81
+ uv sync
82
+
83
+ # Run the CLI
84
+ uv run csdoc --help
85
+ ```
86
+
87
+ ## License
88
+
89
+ MIT