Skip to main content

No project description provided

Project description

repo mapper

This repo provides a tool to generate and update a repo file structure map in a README file. It supports filtering files by extension, ignoring specified directories, and appending or replacing an existing file structure map.

features

  • Scans a directory and generates a file tree structure.
  • Allows filtering by file extensions.
  • Ignores specified directories.
  • Updates the target README file with the generated file tree.
  • Can be integrated with pre-commit hooks.

cli usage:

python -m repo_mapper <directory> <readme_path> [--allowed-extensions <ext1> <ext2> ...] [--ignore-dirs <dir1> <dir2> ...]

args

directory: The root directory to scan for files.

readme_path: Path to the README file to update.

--allowed-extensions: (Optional) List of file extensions to include in the map (e.g., .py, .yaml). Defaults to all files.

--ignore-dirs: (Optional) List of directory names to exclude from the map.

examples

generate a repo map including only Python files and YAML files:

python -m repo_mapper . ./docs/README.md --allowed-extensions .py .yaml

generate a repo map ignoring the tests directory

python -m repo_mapper . ./README.md --ignore-dirs tests

generate a repo map ignoring files that match patterns listed in the gitignore

python -m repo_mapper . ./README.md --use-gitignore

pre-commit integration - used for this repo

- id: repo_mapper
  name: repo_mapper
  entry: python -m repo_mapper . ./docs/README.md --use-gitignore --allowed-extensions .py .yaml .toml .md --ignore-dirs mock_data
  language: system

generated repo map

├── docs
│   └── README.md
├── src
│   └── repo_mapper
│       ├── __init__.py
│       ├── __main__.py
│       ├── io.py
│       └── utils.py
├── tests
│   ├── __init__.py
│   ├── conftest.py
│   └── test_utils.py
├── pyproject.toml
└── ruff.toml
::

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_mapper-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_mapper-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file repo_mapper-0.1.0.tar.gz.

File metadata

  • Download URL: repo_mapper-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for repo_mapper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc2cb2e31ef86ff93e90496f175771b06c41dbcd18c8f148342ea97a3a7dd1d8
MD5 38204967f5c36f41d4b612dcd7f6b64d
BLAKE2b-256 a0ad70dca4acc23e05c7f5a531aaf1aee91e249f1d067410871b7082127d1c6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper-0.1.0.tar.gz:

Publisher: publish.yaml on second-ed/repo_mapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repo_mapper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: repo_mapper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for repo_mapper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1645d96b4a5dec5ea94276a718547238d6cac3869765a4040f351a1ddfb25b68
MD5 4b5afb8e72b1396e69670448cc0e5a9f
BLAKE2b-256 1528f8654f2d9189e75096faf48e8a6174fcf90804e77ee325ea1f1085047abb

See more details on using hashes here.

Provenance

The following attestation bundles were made for repo_mapper-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on second-ed/repo_mapper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page