odsparsator, a .ods parser.
Generate a JSON file from an OpenDocument Format .ods file.
When used as a script, odsparsator parses a .ods file and generates a JSON
file using the odfdo library.
When used as a library, odsparsator parses a .ods file and returns a Python
structure.
The resulting data follows the format of the reverse odsgenerator.py script,
see https://github.com/jdum/odsgenerator
odsparsator is a Python package, using the odfdo library. Current version requires Python >= 3.10, see prior versions for older environments.
Project: https://github.com/jdum/odsparsator
Author: jerome.dumonteil@gmail.com
License: MIT
Installation
Installation from Pypi (recommended):
pip install odsparsator
Installation from sources:
uv sync
CLI usage
odsparsator [-h] [--version] [options] input_file output_file
arguments
input_file: input file, a .ods file.
output_file: output file, JSON file generated from input.
Use odsparsator --help for options:
options:
-h, --help show this help message and exit
--version show program's version number and exit
-m, --minimal keep only rows and cells, no styles, no formula, no column width
-a, --all-styles collect all styles from the input
-c, --color collect background color of cells
-k, --keep-styled keep styled cells with empty value
-s, --see-hidden parse also the hidden sheets
sample
$ odsparsator --minimal sample.ods sample_minimal.json
The result:
{
"body": [
{
"name": "first tab",
"table": [
["a", "b", "c"],
[10, 20, 30]
]
}
]
}
Without the --minimal option:
$ odsparsator sample.ods sample_with_styles.json
The result:
{
"body": [
{
"name": "first tab",
"table": [
{
"row": [
{
"value": "a",
"style": "bold_center_bg_gray_grid_06pt"
},
{
"value": "b",
"style": "bold_center_bg_gray_grid_06pt"
...
Usage from python code
from odsparsator import odsparsator
content = odsparsator.ods_to_python("sample1.ods")
Documentation
See in the ./doc folder:
html/odsparsator.html
License
This project is licensed under the MIT License (see the
LICENSE file for details).
Metadata
Release files for odsparsator 1.18.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odsparsator-1.18.0.tar.gz | 9.1 kB | Without provenance | Details for odsparsator-1.18.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odsparsator-1.18.0-py3-none-any.whl | Python 3 | none | any | Details for odsparsator-1.18.0-py3-none-any.whl |
Total release size: 18.8 kB
Release files / odsparsator-1.18.0.tar.gz
| Download URL | odsparsator-1.18.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d6af7e6e9b62563c510bb736c523409ed970b90b5d9ce22f4a94a65b250ccd2
|
|
BLAKE2b-256 checksum How to use checksums |
1c446319e5e431c224a012bed0f0ccc309a29f605f74c9c4c1670683c2a68c8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / odsparsator-1.18.0-py3-none-any.whl
| Download URL | odsparsator-1.18.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0657d6313371c3b51636b514ee7828f0a32b5e3554590d2b7ff0719a11fd4b37
|
|
BLAKE2b-256 checksum How to use checksums |
199453cba3eddc2b36bb2b5c38cd6d15af5cdc6e99a154ceb618714586e5c344
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for odsparsator 1.18.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.