project-scanner


Nameproject-scanner JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/chigwell/project-scanner
SummaryA Python package to scan project directories and files batch by batch.
upload_time2024-01-08 17:47:50
maintainer
docs_urlNone
authorEugene Evstafev
requires_python>=3.6
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/project-scanner.svg)](https://badge.fury.io/py/project-scanner)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/badge/project-scanner)](https://pepy.tech/project/project-scanner)

# Project Scanner

`ProjectScanner` is a Python package designed to scan your project's directory and file structure, providing a batch-wise navigational approach. It's especially useful for analyzing large projects with deep directory structures, allowing users to paginate through directories and files effectively.

## Installation

To install `ProjectScanner`, use pip:

```bash
pip install project-scanner
```

## Usage

### As a Python Module

You can use `ProjectScanner` as a module in your Python scripts.

Example:

```python
from projectscanner import ProjectScanner

# Initialize the scanner with the root directory of your project
scanner = ProjectScanner(root_dir="path/to/your/project", batch_size=10, max_length=255)

# Scan and print the first batch of items
print("First Batch:")
print(scanner.next_batch())

# Assuming there are more items, scan and print the next batch
print("Next Batch:")
print(scanner.next_batch())

# Go back to the previous batch and print it
print("Previous Batch:")
print(scanner.prev_batch())
```

### Configuration

You can customize the behavior of `ProjectScanner` by adjusting the initialization parameters:

- `root_dir`: The root directory of your project (default is the current working directory).
- `batch_size`: The number of items (files or directories) to include in each batch (default is 10).
- `max_length`: The maximum character length for file or directory names before truncation (default is 255).
- `relative_path`: Set to `True` to use relative paths for items, or `False` for absolute paths (default is `True`).

## Output Example

When you run `ProjectScanner`, it provides you a batch of directory and file names in your project's structure. Here is an example output:

```
First Batch:
["dir1", "dir2", "file1.txt", "file2.txt"]
Next Batch:
["dir3/subdir1", "dir3/subdir2", "file3.txt", "dir4"]
...
```

## Contributing

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

## License

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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chigwell/project-scanner",
    "name": "project-scanner",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Eugene Evstafev",
    "author_email": "chigwel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/72/1e/a0057acd0bb35b3c1fd1c92c583959849d0507a17187bb66254cbc5216b8/project-scanner-0.1.1.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/project-scanner.svg)](https://badge.fury.io/py/project-scanner)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/badge/project-scanner)](https://pepy.tech/project/project-scanner)\n\n# Project Scanner\n\n`ProjectScanner` is a Python package designed to scan your project's directory and file structure, providing a batch-wise navigational approach. It's especially useful for analyzing large projects with deep directory structures, allowing users to paginate through directories and files effectively.\n\n## Installation\n\nTo install `ProjectScanner`, use pip:\n\n```bash\npip install project-scanner\n```\n\n## Usage\n\n### As a Python Module\n\nYou can use `ProjectScanner` as a module in your Python scripts.\n\nExample:\n\n```python\nfrom projectscanner import ProjectScanner\n\n# Initialize the scanner with the root directory of your project\nscanner = ProjectScanner(root_dir=\"path/to/your/project\", batch_size=10, max_length=255)\n\n# Scan and print the first batch of items\nprint(\"First Batch:\")\nprint(scanner.next_batch())\n\n# Assuming there are more items, scan and print the next batch\nprint(\"Next Batch:\")\nprint(scanner.next_batch())\n\n# Go back to the previous batch and print it\nprint(\"Previous Batch:\")\nprint(scanner.prev_batch())\n```\n\n### Configuration\n\nYou can customize the behavior of `ProjectScanner` by adjusting the initialization parameters:\n\n- `root_dir`: The root directory of your project (default is the current working directory).\n- `batch_size`: The number of items (files or directories) to include in each batch (default is 10).\n- `max_length`: The maximum character length for file or directory names before truncation (default is 255).\n- `relative_path`: Set to `True` to use relative paths for items, or `False` for absolute paths (default is `True`).\n\n## Output Example\n\nWhen you run `ProjectScanner`, it provides you a batch of directory and file names in your project's structure. Here is an example output:\n\n```\nFirst Batch:\n[\"dir1\", \"dir2\", \"file1.txt\", \"file2.txt\"]\nNext Batch:\n[\"dir3/subdir1\", \"dir3/subdir2\", \"file3.txt\", \"dir4\"]\n...\n```\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/chigwell/project-scanner/issues).\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python package to scan project directories and files batch by batch.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/chigwell/project-scanner"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d707c9e6f4d100992e8627160604d1583b7a6654da563c4a89a4b61fd6048dd",
                "md5": "1fed2acdd3303f76a486e34caeb6fb54",
                "sha256": "3d964dbb0c4fd2eb740f606febc1c555f52eb88a3ee5583910a62b48683404de"
            },
            "downloads": -1,
            "filename": "project_scanner-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1fed2acdd3303f76a486e34caeb6fb54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4299,
            "upload_time": "2024-01-08T17:47:48",
            "upload_time_iso_8601": "2024-01-08T17:47:48.390637Z",
            "url": "https://files.pythonhosted.org/packages/0d/70/7c9e6f4d100992e8627160604d1583b7a6654da563c4a89a4b61fd6048dd/project_scanner-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "721ea0057acd0bb35b3c1fd1c92c583959849d0507a17187bb66254cbc5216b8",
                "md5": "5fb0762c48b22a154e886ee7437a810f",
                "sha256": "8ccb084fa9fb3529d46450fd5e46042d1792a1a349ee6215905e0ffbf41f4895"
            },
            "downloads": -1,
            "filename": "project-scanner-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5fb0762c48b22a154e886ee7437a810f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3263,
            "upload_time": "2024-01-08T17:47:50",
            "upload_time_iso_8601": "2024-01-08T17:47:50.247822Z",
            "url": "https://files.pythonhosted.org/packages/72/1e/a0057acd0bb35b3c1fd1c92c583959849d0507a17187bb66254cbc5216b8/project-scanner-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-08 17:47:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chigwell",
    "github_project": "project-scanner",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "project-scanner"
}
        
Elapsed time: 0.33431s