The package parses the xml output of publish in MATLAB,.
Project description
This package is used to parse the xml output of MATLAB publish, and this way facilitate deriving more advanced documentation that contain MATLAB code with matching output and figures.
Usage
MATLAB processing
Write the code that you want to create output from as a MATLAB publish document. The package will parse the code, and separate the different cells. The package will separate documentation, executed code, console output and figures.
In MATLAB process the created file (in this case example.m) using publish:
publish('example.m',...
'format', 'xml',...
'imageFormat', 'epsc',...
'outputDir', 'gen/',...
'catchError', false); % Fail on thrown exception
This will produce the file gen/example.xml
Python Processing
Usage:
import matlab_publish_parser as mpp
mf = matlab_publish_parser.parse(Path('example.xml'))
print(mf.filename) # The name of the processed file
print(mf.output_dir) # Directory for generated files
for c in mf.cells:
print(c.title) # Title of cell
print(c.code) # Executed code in cell
print(c.output) # Console output from cell
...
Explore the object to figure out what has been extracted.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matlab_publish_parser-2025.0.0.tar.gz.
File metadata
- Download URL: matlab_publish_parser-2025.0.0.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77d2a84e59ba9e46d2be9812a48db4fc093c1557ad9cb36c00c45c05170cbc2b
|
|
| MD5 |
54526fad82e1f20a520b71d9657c505c
|
|
| BLAKE2b-256 |
62f2d49de4f69379dd99bcbbd91c1758729616b96cc3cde371aba638d8d8fd63
|
File details
Details for the file matlab_publish_parser-2025.0.0-py3-none-any.whl.
File metadata
- Download URL: matlab_publish_parser-2025.0.0-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da97a5368a3a438a10f3cd666fa8bfe794b28c78107bc60879b4425011d5793
|
|
| MD5 |
1e8bdf10c2b032562309e1f248633d3b
|
|
| BLAKE2b-256 |
0181b8b6953bef3a65c312b2fd83662582948e0808fc304f2432da85fa596070
|