Name | diff-parser JSON |
Version |
1.1
JSON |
| download |
home_page | None |
Summary | Parse git diff data or .diff file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed. |
upload_time | 2024-09-09 19:32:03 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT License Copyright (c) 2024 Shaik Abdus Samad Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
diff
file differences
diff parser
diffparser
diff file
git diff
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# diff-parser
diff-parser is a Python package for parsing and representing diff files.
Parse a `git diff` data or `.diff` file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.
## Installation
You can install `diff-parser` using pip:
```
pip install diff-parser
```
## Usage
To use diff-parser, simply import the required modules and classes:
```python
from diff_parser import Diff
# Example usage:
diff = Diff("path/to/diff/file.diff")
for block in diff:
print(block.new_filename) # main.py
print(block.new_filepath) # /path/to/main.py
print(block.old_filename) # main.py
print(block.old_filepath) # /path/to/main.py
print(block.source_hash) # abcdef
print(block.target_hash) # uvwxyz
print(block.type) # modified
print(block.content) # None (to be implemented)
```
## Contributing
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue on the [GitHub repository](https://github.com/shaiksamad/diff-parser/issues).
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/shaiksamad/diff-parser/blob/main/LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "diff-parser",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "diff, file differences, diff parser, diffparser, diff file, git diff",
"author": null,
"author_email": "Shaik Abdus Samad <shaiksamad.dev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/cd/3e/72fb3d2456b7749302f2adbbc1050a1f6bd1ab92504fe836d6509fe42528/diff_parser-1.1.tar.gz",
"platform": null,
"description": "# diff-parser\r\n\r\ndiff-parser is a Python package for parsing and representing diff files.\r\n\r\nParse a `git diff` data or `.diff` file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.\r\n\r\n## Installation\r\n\r\nYou can install `diff-parser` using pip:\r\n\r\n```\r\npip install diff-parser\r\n```\r\n\r\n\r\n## Usage\r\n\r\nTo use diff-parser, simply import the required modules and classes:\r\n\r\n```python\r\nfrom diff_parser import Diff\r\n\r\n# Example usage:\r\ndiff = Diff(\"path/to/diff/file.diff\")\r\nfor block in diff:\r\n print(block.new_filename) # main.py\r\n print(block.new_filepath) # /path/to/main.py\r\n print(block.old_filename) # main.py\r\n print(block.old_filepath) # /path/to/main.py\r\n print(block.source_hash) # abcdef\r\n print(block.target_hash) # uvwxyz\r\n print(block.type) # modified\r\n print(block.content) # None (to be implemented)\r\n```\r\n\r\n## Contributing\r\nContributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue on the [GitHub repository](https://github.com/shaiksamad/diff-parser/issues).\r\n\r\n## License\r\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/shaiksamad/diff-parser/blob/main/LICENSE) file for details.\r\n\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Shaik Abdus Samad Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Parse git diff data or .diff file. Access a list of properties including filenames, filepath, source-hash, target-hash and more for every file changed.",
"version": "1.1",
"project_urls": {
"Homepage": "https://github.com/shaiksamad/diff-parser.git",
"Issues": "https://github.com/shaiksamad/diff-parser/issues",
"Repository": "https://github.com/shaiksamad/diff-parser.git"
},
"split_keywords": [
"diff",
" file differences",
" diff parser",
" diffparser",
" diff file",
" git diff"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a78b2b631b6a9652994db7562834b0c5ee991e11a059ff679f6a5935fc83dde3",
"md5": "4965b07e7165d66200c9ab4b745d99d1",
"sha256": "a915aa00bfaed4e31e1c03bfc33a26ecdc5a00800cdbdecdbb83967b5f102a2b"
},
"downloads": -1,
"filename": "diff_parser-1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4965b07e7165d66200c9ab4b745d99d1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4735,
"upload_time": "2024-09-09T19:31:59",
"upload_time_iso_8601": "2024-09-09T19:31:59.806496Z",
"url": "https://files.pythonhosted.org/packages/a7/8b/2b631b6a9652994db7562834b0c5ee991e11a059ff679f6a5935fc83dde3/diff_parser-1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cd3e72fb3d2456b7749302f2adbbc1050a1f6bd1ab92504fe836d6509fe42528",
"md5": "51efc231b2f747c90c447dfb9aad0892",
"sha256": "e7eed851078380319ba503d20cb8f382088e2f794b54c31ca79759b17bda2f40"
},
"downloads": -1,
"filename": "diff_parser-1.1.tar.gz",
"has_sig": false,
"md5_digest": "51efc231b2f747c90c447dfb9aad0892",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3985,
"upload_time": "2024-09-09T19:32:03",
"upload_time_iso_8601": "2024-09-09T19:32:03.164887Z",
"url": "https://files.pythonhosted.org/packages/cd/3e/72fb3d2456b7749302f2adbbc1050a1f6bd1ab92504fe836d6509fe42528/diff_parser-1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-09 19:32:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shaiksamad",
"github_project": "diff-parser",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "diff-parser"
}