ProjectStructoR


NameProjectStructoR JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/chigwell/projectstructor
SummaryA tool for detecting project structure and technology stack with the help of GPT.
upload_time2024-01-06 21:01:08
maintainer
docs_urlNone
authorEugene Evstafev
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/ProjectStructoR.svg)](https://badge.fury.io/py/ProjectStructoR)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/badge/projectstructor)](https://pepy.tech/project/projectstructor)

# ProjectStructoR

`ProjectStructoR` is a Python tool designed to analyze directories and detect the project structure and technology stack used in the files. It leverages GPT from OpenAI to provide a comprehensive analysis including the count of files, lines of code, and the likely technologies present.

## Installation

To install `ProjectStructoR`, you can use pip:

```bash
pip install ProjectStructoR
```

## Usage

### As a Python Module

ProjectStructoR can be used as a Python module in your scripts.

Example:

```python
from projectstructor.detector import ProjectStructureDetector

# Initialize the detector with the target directory and your OpenAI API key
detector = ProjectStructureDetector('/path/to/your/project', 'your-openai-api-key')

# Detect the structure of the project
print(detector.detect_structure(ignore_gitignore=True))

# Detect the languages used in the project
print(detector.detect_languages())

# Analyze with GPT and print the JSON result
chat_completion = detector.analyze_with_gpt()
content = chat_completion.choices[0].message.content
result = json.loads(content)
print(json.dumps(result, indent=2))
```

### As a Command Line Tool

Currently, `ProjectStructoR` is intended to be used as a module in Python scripts. If there's enough interest, command line functionality may be added in future versions.

## Output Example

When you run `ProjectStructoR`, it outputs the structure of the project directory and a report with the detected languages and technologies. Here is an example output:

```
detected structure: 
project/
|-- main.py
|-- utils/
|   |-- __init__.py
|   |-- helper.py

detected languages and technologies: 
Python files: 3, lines of code: 120
JavaScript files: 1, lines of code: 45
```

## Contributing

Contributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/chigwell/projectstructor/issues).

## License

[MIT](https://choosealicense.com/licenses/mit/)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chigwell/projectstructor",
    "name": "ProjectStructoR",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Eugene Evstafev",
    "author_email": "chigwel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/e6/b8a010febcc830274b1edac846be89e2d7bb10efd996d2bffa8c155e644b/ProjectStructoR-0.0.8.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/ProjectStructoR.svg)](https://badge.fury.io/py/ProjectStructoR)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/badge/projectstructor)](https://pepy.tech/project/projectstructor)\n\n# ProjectStructoR\n\n`ProjectStructoR` is a Python tool designed to analyze directories and detect the project structure and technology stack used in the files. It leverages GPT from OpenAI to provide a comprehensive analysis including the count of files, lines of code, and the likely technologies present.\n\n## Installation\n\nTo install `ProjectStructoR`, you can use pip:\n\n```bash\npip install ProjectStructoR\n```\n\n## Usage\n\n### As a Python Module\n\nProjectStructoR can be used as a Python module in your scripts.\n\nExample:\n\n```python\nfrom projectstructor.detector import ProjectStructureDetector\n\n# Initialize the detector with the target directory and your OpenAI API key\ndetector = ProjectStructureDetector('/path/to/your/project', 'your-openai-api-key')\n\n# Detect the structure of the project\nprint(detector.detect_structure(ignore_gitignore=True))\n\n# Detect the languages used in the project\nprint(detector.detect_languages())\n\n# Analyze with GPT and print the JSON result\nchat_completion = detector.analyze_with_gpt()\ncontent = chat_completion.choices[0].message.content\nresult = json.loads(content)\nprint(json.dumps(result, indent=2))\n```\n\n### As a Command Line Tool\n\nCurrently, `ProjectStructoR` is intended to be used as a module in Python scripts. If there's enough interest, command line functionality may be added in future versions.\n\n## Output Example\n\nWhen you run `ProjectStructoR`, it outputs the structure of the project directory and a report with the detected languages and technologies. Here is an example output:\n\n```\ndetected structure: \nproject/\n|-- main.py\n|-- utils/\n|   |-- __init__.py\n|   |-- helper.py\n\ndetected languages and technologies: \nPython files: 3, lines of code: 120\nJavaScript files: 1, lines of code: 45\n```\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/chigwell/projectstructor/issues).\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A tool for detecting project structure and technology stack with the help of GPT.",
    "version": "0.0.8",
    "project_urls": {
        "Homepage": "https://github.com/chigwell/projectstructor"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1ee11ef94a48b11e2879bccad261838c8206645f7d57c1eeaa320ddefb53f510",
                "md5": "1ced9f8301f4442668363a3ef65884f9",
                "sha256": "06eac9fb410eaa66a1d0dbcbbdf5bc967fdbcfe489a0b1fcc2af0ed59b62f53d"
            },
            "downloads": -1,
            "filename": "ProjectStructoR-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ced9f8301f4442668363a3ef65884f9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5474,
            "upload_time": "2024-01-06T21:01:04",
            "upload_time_iso_8601": "2024-01-06T21:01:04.336831Z",
            "url": "https://files.pythonhosted.org/packages/1e/e1/1ef94a48b11e2879bccad261838c8206645f7d57c1eeaa320ddefb53f510/ProjectStructoR-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bbe6b8a010febcc830274b1edac846be89e2d7bb10efd996d2bffa8c155e644b",
                "md5": "685ad0db444e18e251343347d2bbd972",
                "sha256": "f3f1c2c36c3320da4df844e7742eb3b04bc1beca8961005e8922774a54a28d98"
            },
            "downloads": -1,
            "filename": "ProjectStructoR-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "685ad0db444e18e251343347d2bbd972",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4283,
            "upload_time": "2024-01-06T21:01:08",
            "upload_time_iso_8601": "2024-01-06T21:01:08.821796Z",
            "url": "https://files.pythonhosted.org/packages/bb/e6/b8a010febcc830274b1edac846be89e2d7bb10efd996d2bffa8c155e644b/ProjectStructoR-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-06 21:01:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chigwell",
    "github_project": "projectstructor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "projectstructor"
}
        
Elapsed time: 0.65909s