diff-parser


Namediff-parser JSON
Version 1.0 PyPI version JSON
download
home_pageNone
SummaryParse 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.
upload_time2024-04-22 19:21:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseMIT 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.filname)    # main.py
    print(block.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/4e/1d/18d0314ac6f5bbfec5da5e2d2ad82f2f457637062017d0e2b81e576861c3/diff_parser-1.0.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.filname)    # main.py\r\n    print(block.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 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.",
    "version": "1.0",
    "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": "7293c33365ee912ed3c8704bcb28db498a918a74d6b25d0e0beb52e9e776e320",
                "md5": "77d6700f5de00b3c59da773b447bdb90",
                "sha256": "827de2c70ccdc63e32f4eda692f799d4e1e77fb34d74974ade0428cc499a9715"
            },
            "downloads": -1,
            "filename": "diff_parser-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77d6700f5de00b3c59da773b447bdb90",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4650,
            "upload_time": "2024-04-22T19:21:13",
            "upload_time_iso_8601": "2024-04-22T19:21:13.304846Z",
            "url": "https://files.pythonhosted.org/packages/72/93/c33365ee912ed3c8704bcb28db498a918a74d6b25d0e0beb52e9e776e320/diff_parser-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e1d18d0314ac6f5bbfec5da5e2d2ad82f2f457637062017d0e2b81e576861c3",
                "md5": "c05a5e3b670fc68bb42575647ea97f86",
                "sha256": "4bfe6545c36421d1b6297911785eefc11d5c6bebda812d010be3b91b29216432"
            },
            "downloads": -1,
            "filename": "diff_parser-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c05a5e3b670fc68bb42575647ea97f86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3869,
            "upload_time": "2024-04-22T19:21:15",
            "upload_time_iso_8601": "2024-04-22T19:21:15.332213Z",
            "url": "https://files.pythonhosted.org/packages/4e/1d/18d0314ac6f5bbfec5da5e2d2ad82f2f457637062017d0e2b81e576861c3/diff_parser-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-22 19:21:15",
    "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"
}
        
Elapsed time: 0.23920s