diff-parse
Description
diff-parse is a Python project that provides a utility to parse git diff strings into a structured JSON format. This
can be useful for analyzing changes in code, generating reports, or integrating with other tools that require diff
information.
Installation
To install the dependencies for this project, you can use the following command:
pip install -r requirements.txt
Usage
You can use the diff-parse script to parse a git diff string. The script is defined in the pyproject.toml file and
can be executed as follows:
diff-parse "your_git_diff_string_here"
Alternatively, you can run the script directly using Python:
python src/gitdiffparser/cli.py "your_git_diff_string_here"
Example
Here is an example of how to use the diff-parse script:
diff-parse "diff --git a/file.txt b/file.txt\nindex 83db48f..f735c2d 100644\n--- a/file.txt\n+++ b/file.txt\n@@ -1,3 +1,3 @@\n-Hello World\n+Hello Python\n This is a test file."
Project Structure
src/diff_parse/cli.py: Entry point for the command-line interface.src/diff_parse/app.py: Contains the main logic for parsing git diff strings.pyproject.toml: Project configuration file.
Dependencies
fire>=0.7.0pydantic>=2.10.6
License
This project is licensed under the MIT License.
Metadata
Release files for gitdiffparser 0.1.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 | |
|---|---|---|---|
| gitdiffparser-0.1.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitdiffparser-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / gitdiffparser-0.1.0.tar.gz
| Download URL | gitdiffparser-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e17cbcd7fd61827f1bbad8d459ad61b2c09031d2bcbaf7611011d79a3b240f5f
|
|
BLAKE2b-256 checksum How to use checksums |
b582885ed0a01c40ae6a5d8d27cf98b9ed4c9387f063315221989f92174c241c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.0 CPython/3.12.8 Darwin/24.2.0
|
Release files / gitdiffparser-0.1.0-py3-none-any.whl
| Download URL | gitdiffparser-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9433cd041503714c6364824cf9ed4c9d5e219a534098172971e525823bdd2a2
|
|
BLAKE2b-256 checksum How to use checksums |
054515e8a55c325a826fb906628a254d452a8ab5879c446fca25e7cacb728aaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.0 CPython/3.12.8 Darwin/24.2.0
|