A module to synchronize metadata between TOML and CFF files, including between pyproject.toml and CITATION.cff files.
Table of Contents
pip install cff2toml
This package offers a CLI and classes to manipulate metadata in CFF and TOML files.
One common use case is to synchronize metadata between pyproject.toml and CITATION.cff files in a Python software project.
The CLI allows you to view and change common metadata between CITATION.cff and pyproject.toml files, including the Python project's:
- title
- description
- license
- version
- repo
You can learn more about the CLI options and commands by running the following help option:
cff2toml --help
Here is how you view the version in both CITATION.cff and pyproject.toml, assuming they are in the same directory
cff2toml view version
You can also view other common metadata. See the help.
Here is how you change the version in both CITATION.cff and pyproject.toml, assuming they are in the same directory
cff2toml change version 2.30.1
You can also change other common metadata. See the help.
The CLI and its underlying classes are in early and active development, so they should not be used yet for production systems. The classed used by the CLI may have more functionality than what is currently exposed through the CLI.
- Improve CLI tool to view and change other metadata fields.
- Improve documentation of the underlying classes.
cff2toml
is distributed under the terms of the Apache 2.0 license
Contributions in the form of feature requests, bug reports, bug fixes, tests, and feature implementations are welcome. To contribute code, please fork the project, and then do a pull request.
To build the tool locally, please follow the general advice from here.
python3 -m pip install --upgrade build
python3 -m build
To deploy the tool, use the Github Action defined in .github/workflows/python-publish.yml