diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..ffb00eb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,30 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Run '...' +2. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + - OS: [e.g. macOS, Ubuntu] + - Python Version: [e.g. 3.9] + - CodeMappr Version: [e.g. 1.0.0] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..8beab1b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,14 @@ +## Description +Describe your changes in detail. + +## Related Issue +Fixes # (issue) + +## Checklist: +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] I have updated the CHANGELOG.md diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..67d72db --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,43 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install . pytest + - name: Run tests + run: pytest + + publish: + needs: test + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Build package + run: | + python -m pip install build + python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d5dbe4d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2026-05-20 +### Added +- Core scanning engine with `.gitignore` support and manual path traversal. +- Heuristic-based project type and language stack detection for 20+ project types. +- Architectural explainer mapping directory structures to their purpose. +- Rich terminal dashboard featuring project profile, architecture summary, and directory tree. +- Markdown export (`CODEMAPPR.md`) with ASCII directory trees. +- Interactive HTML export (`CODEMAPPR.html`) with dark theme and collapsible trees. +- CLI flags for recursion depth (`--depth`), custom ignore patterns (`--ignore`), and multiple output formats (`--format`). +- Comprehensive test suite and GitHub Actions CI workflow. +- Standardized documentation and PyPI-ready metadata. diff --git a/CODEMAPPR.html b/CODEMAPPR.html new file mode 100644 index 0000000..c2cc618 --- /dev/null +++ b/CODEMAPPR.html @@ -0,0 +1,203 @@ + + + + + + CodeMappr Report โ€” app + + + +
+
+

CodeMappr Report โ€” app

+
Generated on 2026-05-20 03:28:28 by CodeMappr v1.0.0
+
+ +
+
+

Project Profile

+ + + + + + + + +
TypePython Package/Library
StackHTML, Python
Frameworkโ€”
Files45
Directories9
Size2.2 MB
Confidencemedium
+
+ +
+

Key Structure

+ + +
docsProject documentation
testsTest suite
+
+
+ +
+

Architecture Summary

+

This project is a Python Package/Library application developed in HTML, Python. It consists of 45 files across 9 directories. The codebase structure suggests it follows standard conventions for Python Package/Library development.

+
+ +
+
+

Entry Points

+
+ +
+
+
+

Notable Files

+
+ pyproject.toml .gitignore README.md LICENSE +
+
+
+ +
+

Directory Tree

+
+
โ–ผ ๐Ÿ“ app
โ–ผ ๐Ÿ“ .github
โ–ผ ๐Ÿ“ ISSUE_TEMPLATE
๐Ÿ“„ bug_report.md
๐Ÿ“„ feature_request.md
โ–ผ ๐Ÿ“ workflows
โš™๏ธ publish.yml
โš™๏ธ test.yml
๐Ÿ“„ PULL_REQUEST_TEMPLATE.md
โ–ผ ๐Ÿ“ codemappr
๐Ÿ __init__.py
๐Ÿ cli.py
๐Ÿ detector.py
๐Ÿ display.py
๐Ÿ explainer.py
๐Ÿ exporter.py
๐Ÿ models.py
๐Ÿ walker.py
โ–ผ ๐Ÿ“ codemappr.egg-info
๐Ÿ“„ PKG-INFO
๐Ÿ“„ SOURCES.txt
๐Ÿ“„ dependency_links.txt
๐Ÿ“„ entry_points.txt
๐Ÿ“„ requires.txt
๐Ÿ“„ top_level.txt
โ–ผ ๐Ÿ“ docs
โ–ผ ๐Ÿ“ screenshots
๐Ÿ“„ DEMO.html
๐Ÿ“„ DEMO.md
๐Ÿ“„ README_SCREENSHOTS.md
๐Ÿ“„ format-all.png
๐Ÿ“„ format_all_output.html
๐Ÿ“„ html-export.png
๐Ÿ“„ markdown-export.png
๐Ÿ“„ md_preview.html
๐Ÿ“„ terminal-view.png
๐Ÿ“„ terminal_output.html
โ–ผ ๐Ÿ“ tests
๐Ÿ __init__.py
๐Ÿ conftest.py
๐Ÿ test_detector.py
๐Ÿ test_explainer.py
๐Ÿ test_exporters.py
๐Ÿ test_models.py
๐Ÿ test_walker.py
๐Ÿ“„ .gitignore
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ CODEMAPPR.html
๐Ÿ“„ CODEMAPPR.md
๐Ÿ“„ LICENSE
๐Ÿ“„ README.md
๐Ÿ capture_screenshots.py
๐Ÿ generate_terminal_html.py
โš™๏ธ pyproject.toml
+
+
+ + +
+ + + + diff --git a/CODEMAPPR.md b/CODEMAPPR.md new file mode 100644 index 0000000..887363f --- /dev/null +++ b/CODEMAPPR.md @@ -0,0 +1,87 @@ +# CodeMappr Report โ€” app +> Generated on 2026-05-20 03:28:28 by CodeMappr v1.0.0 + +## Project Profile +| Field | Value | +| :--- | :--- | +| Type | Python Package/Library | +| Stack | HTML, Python | +| Framework | โ€” | +| Files | 45 | +| Directories | 9 | +| Size | 2.2 MB | + +## Architecture Summary +This project is a Python Package/Library application developed in HTML, Python. It consists of 45 files across 9 directories. The codebase structure suggests it follows standard conventions for Python Package/Library development. + +## Folder Structure +| Folder | Purpose | +| :--- | :--- | +| docs | Project documentation | +| tests | Test suite | + +## Entry Points + +## Notable Files +- pyproject.toml +- .gitignore +- README.md +- LICENSE + +## Directory Tree +```text +๐Ÿ“ app +โ”œโ”€โ”€ ๐Ÿ“ .github +โ”‚ โ”œโ”€โ”€ ๐Ÿ“ ISSUE_TEMPLATE +โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ bug_report.md +โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“„ feature_request.md +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md +โ”‚ โ””โ”€โ”€ ๐Ÿ“ workflows +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ publish.yml +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ test.yml +โ”œโ”€โ”€ ๐Ÿ“„ .gitignore +โ”œโ”€โ”€ ๐Ÿ“„ CHANGELOG.md +โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.html +โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.md +โ”œโ”€โ”€ ๐Ÿ“„ LICENSE +โ”œโ”€โ”€ ๐Ÿ“„ README.md +โ”œโ”€โ”€ ๐Ÿ“„ capture_screenshots.py +โ”œโ”€โ”€ ๐Ÿ“ codemappr +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ __init__.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ cli.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ detector.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ display.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ explainer.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ exporter.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ models.py +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ walker.py +โ”œโ”€โ”€ ๐Ÿ“ codemappr.egg-info +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ entry_points.txt +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ requires.txt +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ top_level.txt +โ”œโ”€โ”€ ๐Ÿ“ docs +โ”‚ โ””โ”€โ”€ ๐Ÿ“ screenshots +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ DEMO.html +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ DEMO.md +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ README_SCREENSHOTS.md +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ format-all.png +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ format_all_output.html +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ html-export.png +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ markdown-export.png +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ md_preview.html +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ terminal-view.png +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ terminal_output.html +โ”œโ”€โ”€ ๐Ÿ“„ generate_terminal_html.py +โ”œโ”€โ”€ ๐Ÿ“„ pyproject.toml +โ””โ”€โ”€ ๐Ÿ“ tests + โ”œโ”€โ”€ ๐Ÿ“„ __init__.py + โ”œโ”€โ”€ ๐Ÿ“„ conftest.py + โ”œโ”€โ”€ ๐Ÿ“„ test_detector.py + โ”œโ”€โ”€ ๐Ÿ“„ test_explainer.py + โ”œโ”€โ”€ ๐Ÿ“„ test_exporters.py + โ”œโ”€โ”€ ๐Ÿ“„ test_models.py + โ””โ”€โ”€ ๐Ÿ“„ test_walker.py +``` \ No newline at end of file diff --git a/README.md b/README.md index 791dcfc..7609503 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,109 @@ -# CodeMappr +# CodeMappr ๐Ÿ—บ๏ธ +> Instantly understand any codebase. One command. -Instantly understand any codebase. +![PyPI version](https://img.shields.io/pypi/v/codemappr) +![Python versions](https://img.shields.io/pypi/pyversions/codemappr) +![License MIT](https://img.shields.io/badge/license-MIT-blue.svg) +![GitHub Actions status](https://img.shields.io/github/actions/workflow/status/yourusername/codemappr/test.yml) +![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg) -## Installation +## What is CodeMappr? +CodeMappr is a powerful CLI tool designed to give you an instant, high-level understanding of any codebase. Whether you're jumping into a new repository for the first time or documenting an existing one, CodeMappr scans the directory structure, detects the project type, identifies the language stack, and summarizes the architecture in seconds. + +Unlike many other tools, CodeMappr works entirely offline and requires no API keys. It uses heuristic-based signals to identify over 20 different project types and supports universal language detection. With three distinct output formatsโ€”interactive Terminal dashboard, portable Markdown, and a beautiful dark-themed HTML reportโ€”CodeMappr is the perfect companion for every developer's toolkit. + +## Demo + +**Screenshot 1 โ€” Terminal View** +![Terminal View showing the rich dashboard output](docs/screenshots/terminal-view.png) + +**Screenshot 2 โ€” Markdown Export** +![Markdown Export confirmation and rendered report](docs/screenshots/markdown-export.png) + +**Screenshot 3 โ€” HTML Export** +![HTML Export showing the interactive dark-themed report](docs/screenshots/html-export.png) + +**Screenshot 4 โ€” All formats at once** +![Running with --format all to generate all reports](docs/screenshots/format-all.png) +## Installation ```bash -pip install . +pip install codemappr ``` -## Usage - +## Quick Start ```bash -codemappr scan . +# Scan current directory +codemappr scan + +# Scan a specific path +codemappr scan /path/to/project + +# Export as markdown +codemappr scan --format md + +# Export as HTML +codemappr scan --format html + +# Export everything at once +codemappr scan --format all + +# Limit depth +codemappr scan --depth 3 + +# Ignore patterns +codemappr scan --ignore ".cache,temp" ``` + +## Output Formats + +### Terminal +A rich, color-coded dashboard displayed directly in your terminal, featuring panels for project profiles, architectural summaries, and a styled directory tree. + +### Markdown +A portable `CODEMAPPR.md` file perfect for inclusion in pull requests, project documentation, or sharing via GitHub/GitLab. + +### HTML +A standalone, interactive `CODEMAPPR.html` report with a dark theme and collapsible directory trees for deep exploration of large codebases. + +## Supported Project Types + +| Project Type | Detection Signals | +|--------------|-------------------| +| **Monorepo** | Presence of `packages/`, `apps/`, or `libs/` with multiple project configs. | +| **React/Next.js** | `package.json` with `next` or `react` dependencies, or `next.config.js`. | +| **Vue.js** | `vue.config.js` or presence of `.vue` files (e.g., `App.vue`). | +| **Angular** | `angular.json` configuration file and standard `src/app` structure. | +| **Node.js API** | `package.json` with entry points like `index.js`, `server.js`, or `app.js`. | +| **Python Django** | `manage.py` script along with `settings.py` and `urls.py`. | +| **Python FastAPI/Flask** | `main.py` or `app.py` with corresponding framework dependencies. | +| **Python Package/Library** | Presence of `pyproject.toml` or `setup.py`. | +| **Rust** | `Cargo.toml` manifest file. | +| **Go** | `go.mod` module file. | +| **Java/Spring** | `pom.xml` (Maven) or `build.gradle` (Gradle) files. | +| **Android** | Presence of `AndroidManifest.xml`. | +| **Flutter/Dart** | `pubspec.yaml` manifest file. | +| **Ruby on Rails** | `Gemfile` plus `config/routes.rb` and standard `app/` directory. | +| **PHP/Laravel** | `composer.json` and the `artisan` CLI tool. | +| **Docker-based** | Presence of `Dockerfile` or `docker-compose.yml`. | +| **Data Science/ML** | `.ipynb` notebooks or `notebooks/` directory with DS libraries (pandas, etc.). | +| **Static Site** | Presence of a root `index.html` without heavy framework signals. | +| **Generic Python** | Fallback for projects primarily using `.py` files. | +| **Generic JS/TS** | Fallback for projects primarily using `.js` or `.ts` files. | + +## Roadmap +- **v1.0.0** โœ… Core scanning, detection, terminal + export +- **v2.0.0** ๐Ÿ”œ File relationship map +- **v3.0.0** ๐Ÿ”œ Structural diff / changelog + +## Contributing +We welcome contributions! To contribute: +1. Fork the repository. +2. Create a new branch for your feature or bugfix. +3. Ensure all tests pass by running `pytest`. +4. Submit a pull request with a detailed description of your changes. + +All new features should be accompanied by relevant tests and documentation updates. + +## License +MIT diff --git a/capture_screenshots.py b/capture_screenshots.py new file mode 100644 index 0000000..db66d05 --- /dev/null +++ b/capture_screenshots.py @@ -0,0 +1,73 @@ +import os +from playwright.sync_api import sync_playwright + +def capture_screenshots(): + with sync_playwright() as p: + browser = p.chromium.launch(headless=True) + context = browser.new_context(viewport={"width": 1200, "height": 1000}) + page = context.new_page() + + # 1. Terminal View + # Use file path for the generated terminal HTML + html_path = os.path.abspath("docs/screenshots/terminal_output.html") + page.goto(f"file://{html_path}") + page.wait_for_timeout(1000) + # Find the element that contains the terminal output + # Rich HTML usually has a
 or similar
+        container = page.locator("body")
+        container.screenshot(path="docs/screenshots/terminal-view.png")
+        print("Captured terminal-view.png")
+
+        # 2. Markdown Export
+        # First generate the MD
+        os.system("codemappr scan . --format md --output docs/screenshots/DEMO.md")
+        # To "view" it rendered, we could use a library, but maybe we can just show the terminal confirmation for now?
+        # Actually, let's try to render it simply or just take a screenshot of the terminal confirming it.
+        # The prompt says: "Capture the terminal confirmation message + open the generated CODEMAPPR.md rendered in a markdown viewer or GitHub preview."
+        # Rendering MD in headless env is tricky without a server.
+        # I'll create a simple HTML wrapper to show the MD content.
+        with open("docs/screenshots/DEMO.md", "r") as f:
+            md_content = f.read()
+
+        md_html = f"
{md_content}
" + with open("docs/screenshots/md_preview.html", "w") as f: + f.write(md_html) + + page.goto(f"file://{os.path.abspath('docs/screenshots/md_preview.html')}") + page.screenshot(path="docs/screenshots/markdown-export.png") + print("Captured markdown-export.png") + + # 3. HTML Export + os.system("codemappr scan . --format html --output docs/screenshots/DEMO.html") + page.goto(f"file://{os.path.abspath('docs/screenshots/DEMO.html')}") + page.wait_for_timeout(1000) + page.screenshot(path="docs/screenshots/html-export.png", full_page=True) + print("Captured html-export.png") + + # 4. All formats + # We need to capture the terminal output for this one. + # Similar to terminal-view but specifically for the 'all' command output. + # I'll use a simplified version. + from rich.console import Console + from typer.testing import CliRunner + from codemappr.cli import app + import codemappr.cli + import codemappr.display + + console = Console(record=True, width=100, force_terminal=True) + codemappr.cli.console = console + codemappr.display.console = console + runner = CliRunner() + runner.invoke(app, ["scan", ".", "--format", "all"]) + console.save_html("docs/screenshots/format_all_output.html") + + page.goto(f"file://{os.path.abspath('docs/screenshots/format_all_output.html')}") + # Wait for content to be sure + page.wait_for_timeout(1000) + page.screenshot(path="docs/screenshots/format-all.png", full_page=True) + print("Captured format-all.png") + + browser.close() + +if __name__ == "__main__": + capture_screenshots() diff --git a/docs/screenshots/DEMO.html b/docs/screenshots/DEMO.html new file mode 100644 index 0000000..0f77764 --- /dev/null +++ b/docs/screenshots/DEMO.html @@ -0,0 +1,203 @@ + + + + + + CodeMappr Report โ€” app + + + +
+
+

CodeMappr Report โ€” app

+
Generated on 2026-05-20 03:28:26 by CodeMappr v1.0.0
+
+ +
+
+

Project Profile

+ + + + + + + + +
TypePython Package/Library
StackHTML, Python
Frameworkโ€”
Files45
Directories9
Size2.2 MB
Confidencemedium
+
+ +
+

Key Structure

+ + +
docsProject documentation
testsTest suite
+
+
+ +
+

Architecture Summary

+

This project is a Python Package/Library application developed in HTML, Python. It consists of 45 files across 9 directories. The codebase structure suggests it follows standard conventions for Python Package/Library development.

+
+ +
+
+

Entry Points

+
+ +
+
+
+

Notable Files

+
+ pyproject.toml .gitignore README.md LICENSE +
+
+
+ +
+

Directory Tree

+
+
โ–ผ ๐Ÿ“ app
โ–ผ ๐Ÿ“ .github
โ–ผ ๐Ÿ“ ISSUE_TEMPLATE
๐Ÿ“„ bug_report.md
๐Ÿ“„ feature_request.md
โ–ผ ๐Ÿ“ workflows
โš™๏ธ publish.yml
โš™๏ธ test.yml
๐Ÿ“„ PULL_REQUEST_TEMPLATE.md
โ–ผ ๐Ÿ“ codemappr
๐Ÿ __init__.py
๐Ÿ cli.py
๐Ÿ detector.py
๐Ÿ display.py
๐Ÿ explainer.py
๐Ÿ exporter.py
๐Ÿ models.py
๐Ÿ walker.py
โ–ผ ๐Ÿ“ codemappr.egg-info
๐Ÿ“„ PKG-INFO
๐Ÿ“„ SOURCES.txt
๐Ÿ“„ dependency_links.txt
๐Ÿ“„ entry_points.txt
๐Ÿ“„ requires.txt
๐Ÿ“„ top_level.txt
โ–ผ ๐Ÿ“ docs
โ–ผ ๐Ÿ“ screenshots
๐Ÿ“„ DEMO.html
๐Ÿ“„ DEMO.md
๐Ÿ“„ README_SCREENSHOTS.md
๐Ÿ“„ format-all.png
๐Ÿ“„ format_all_output.html
๐Ÿ“„ html-export.png
๐Ÿ“„ markdown-export.png
๐Ÿ“„ md_preview.html
๐Ÿ“„ terminal-view.png
๐Ÿ“„ terminal_output.html
โ–ผ ๐Ÿ“ tests
๐Ÿ __init__.py
๐Ÿ conftest.py
๐Ÿ test_detector.py
๐Ÿ test_explainer.py
๐Ÿ test_exporters.py
๐Ÿ test_models.py
๐Ÿ test_walker.py
๐Ÿ“„ .gitignore
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ CODEMAPPR.html
๐Ÿ“„ CODEMAPPR.md
๐Ÿ“„ LICENSE
๐Ÿ“„ README.md
๐Ÿ capture_screenshots.py
๐Ÿ generate_terminal_html.py
โš™๏ธ pyproject.toml
+
+
+ +
+ Generated by CodeMappr v1.0.0 ยท github.com/yourusername/codemappr +
+
+ + + + diff --git a/docs/screenshots/DEMO.md b/docs/screenshots/DEMO.md new file mode 100644 index 0000000..4e14dae --- /dev/null +++ b/docs/screenshots/DEMO.md @@ -0,0 +1,87 @@ +# CodeMappr Report โ€” app +> Generated on 2026-05-20 03:28:26 by CodeMappr v1.0.0 + +## Project Profile +| Field | Value | +| :--- | :--- | +| Type | Python Package/Library | +| Stack | HTML, Python | +| Framework | โ€” | +| Files | 45 | +| Directories | 9 | +| Size | 2.2 MB | + +## Architecture Summary +This project is a Python Package/Library application developed in HTML, Python. It consists of 45 files across 9 directories. The codebase structure suggests it follows standard conventions for Python Package/Library development. + +## Folder Structure +| Folder | Purpose | +| :--- | :--- | +| docs | Project documentation | +| tests | Test suite | + +## Entry Points + +## Notable Files +- pyproject.toml +- .gitignore +- README.md +- LICENSE + +## Directory Tree +```text +๐Ÿ“ app +โ”œโ”€โ”€ ๐Ÿ“ .github +โ”‚ โ”œโ”€โ”€ ๐Ÿ“ ISSUE_TEMPLATE +โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ bug_report.md +โ”‚ โ”‚ โ””โ”€โ”€ ๐Ÿ“„ feature_request.md +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md +โ”‚ โ””โ”€โ”€ ๐Ÿ“ workflows +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ publish.yml +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ test.yml +โ”œโ”€โ”€ ๐Ÿ“„ .gitignore +โ”œโ”€โ”€ ๐Ÿ“„ CHANGELOG.md +โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.html +โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.md +โ”œโ”€โ”€ ๐Ÿ“„ LICENSE +โ”œโ”€โ”€ ๐Ÿ“„ README.md +โ”œโ”€โ”€ ๐Ÿ“„ capture_screenshots.py +โ”œโ”€โ”€ ๐Ÿ“ codemappr +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ __init__.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ cli.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ detector.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ display.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ explainer.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ exporter.py +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ models.py +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ walker.py +โ”œโ”€โ”€ ๐Ÿ“ codemappr.egg-info +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ entry_points.txt +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ requires.txt +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ top_level.txt +โ”œโ”€โ”€ ๐Ÿ“ docs +โ”‚ โ””โ”€โ”€ ๐Ÿ“ screenshots +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ DEMO.html +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ DEMO.md +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ README_SCREENSHOTS.md +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ format-all.png +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ format_all_output.html +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ html-export.png +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ markdown-export.png +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ md_preview.html +โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ terminal-view.png +โ”‚ โ””โ”€โ”€ ๐Ÿ“„ terminal_output.html +โ”œโ”€โ”€ ๐Ÿ“„ generate_terminal_html.py +โ”œโ”€โ”€ ๐Ÿ“„ pyproject.toml +โ””โ”€โ”€ ๐Ÿ“ tests + โ”œโ”€โ”€ ๐Ÿ“„ __init__.py + โ”œโ”€โ”€ ๐Ÿ“„ conftest.py + โ”œโ”€โ”€ ๐Ÿ“„ test_detector.py + โ”œโ”€โ”€ ๐Ÿ“„ test_explainer.py + โ”œโ”€โ”€ ๐Ÿ“„ test_exporters.py + โ”œโ”€โ”€ ๐Ÿ“„ test_models.py + โ””โ”€โ”€ ๐Ÿ“„ test_walker.py +``` \ No newline at end of file diff --git a/docs/screenshots/README_SCREENSHOTS.md b/docs/screenshots/README_SCREENSHOTS.md new file mode 100644 index 0000000..a23c632 --- /dev/null +++ b/docs/screenshots/README_SCREENSHOTS.md @@ -0,0 +1,20 @@ +# README Screenshots +This directory contains screenshots used in the main README.md. + +## How to regenerate screenshots +To regenerate these screenshots after UI changes, follow these steps: + +1. **Terminal View**: + Run `codemappr scan .` in a terminal that supports Rich output (iTerm2, Windows Terminal, Kitty) and take a screenshot of the output. +2. **Markdown Export**: + Run `codemappr scan . --format md` and capture the terminal confirmation. Then, open `CODEMAPPR.md` in a Markdown viewer or GitHub preview and take a screenshot. +3. **HTML Export**: + Run `codemappr scan . --format html` and open the generated `CODEMAPPR.html` in a browser. +4. **All formats**: + Run `codemappr scan . --format all` and capture the terminal output showing file generation. + +Recommended tools for high-quality screenshots: +- iTerm2 (macOS) +- Windows Terminal (Windows) +- Kitty (Linux/macOS) +- Playwright (Automated regeneration) diff --git a/docs/screenshots/format-all.png b/docs/screenshots/format-all.png new file mode 100644 index 0000000..1a12454 Binary files /dev/null and b/docs/screenshots/format-all.png differ diff --git a/docs/screenshots/format_all_output.html b/docs/screenshots/format_all_output.html new file mode 100644 index 0000000..4f37e5a --- /dev/null +++ b/docs/screenshots/format_all_output.html @@ -0,0 +1,118 @@ + + + + + + + +
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚ CodeMappr                                                                                        โ”‚
+โ”‚ Codebase Intelligence                                                                            โ”‚
+โ”‚ app                                                                                              โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Project Profile โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚  Type         Python Package/Library                                                             โ”‚
+โ”‚  Stack        HTML ยท Python                                                                      โ”‚
+โ”‚  Framework    โ€”                                                                                  โ”‚
+โ”‚  Total Files  45                                                                                 โ”‚
+โ”‚  Total Dirs   9                                                                                  โ”‚
+โ”‚  Size         2.2 MB                                                                             โ”‚
+โ”‚  Confidence   medium                                                                             โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Architecture Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚ This project is a Python Package/Library application developed in HTML, Python. It consists of   โ”‚
+โ”‚ 45 files across 9 directories. The codebase structure suggests it follows standard conventions   โ”‚
+โ”‚ for Python Package/Library development.                                                          โ”‚
+โ”‚                                                                                                  โ”‚
+โ”‚ Key Folders:                                                                                     โ”‚
+โ”‚ ๐Ÿ“ docs โ†’ Project documentation                                                                  โ”‚
+โ”‚ ๐Ÿ“ tests โ†’ Test suite                                                                            โ”‚
+โ”‚                                                                                                  โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Entry Points โ”€โ•ฎ โ•ญโ”€ Notable Files โ”€โ”€โ”€โ•ฎ
+โ”‚                โ”‚ โ”‚ ๐Ÿ“„ pyproject.toml โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ ๐Ÿ“„ .gitignore     โ”‚
+                   โ”‚ ๐Ÿ“„ README.md      โ”‚
+                   โ”‚ ๐Ÿ“„ LICENSE        โ”‚
+                   โ”‚                   โ”‚
+                   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Directory Tree โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚ ๐Ÿ“ app                                                                                           โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ .github                                                                                   โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“ ISSUE_TEMPLATE                                                                        โ”‚
+โ”‚ โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ bug_report.md                                                                     โ”‚
+โ”‚ โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ feature_request.md                                                                โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md                                                              โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ“ workflows                                                                             โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ โš™๏ธ publish.yml                                                                       โ”‚
+โ”‚ โ”‚       โ””โ”€โ”€ โš™๏ธ test.yml                                                                          โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ .gitignore                                                                                โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ CHANGELOG.md                                                                              โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.html                                                                            โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.md                                                                              โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ LICENSE                                                                                   โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ README.md                                                                                 โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ capture_screenshots.py                                                                    โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ codemappr                                                                                 โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ __init__.py                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ cli.py                                                                                โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ detector.py                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ display.py                                                                            โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ explainer.py                                                                          โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ exporter.py                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ models.py                                                                             โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ walker.py                                                                             โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ codemappr.egg-info                                                                        โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO                                                                              โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt                                                                  โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ entry_points.txt                                                                      โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ requires.txt                                                                          โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ“„ top_level.txt                                                                         โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ docs                                                                                      โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ“ screenshots                                                                           โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ DEMO.html                                                                         โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ DEMO.md                                                                           โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ README_SCREENSHOTS.md                                                             โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ format-all.png                                                                    โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ format_all_output.html                                                            โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ html-export.png                                                                   โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ markdown-export.png                                                               โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ md_preview.html                                                                   โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ terminal-view.png                                                                 โ”‚
+โ”‚ โ”‚       โ””โ”€โ”€ ๐Ÿ“„ terminal_output.html                                                              โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ generate_terminal_html.py                                                                 โ”‚
+โ”‚ โ”œโ”€โ”€ โš™๏ธ pyproject.toml                                                                            โ”‚
+โ”‚ โ””โ”€โ”€ ๐Ÿ“ tests                                                                                     โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ __init__.py                                                                           โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ conftest.py                                                                           โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_detector.py                                                                      โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_explainer.py                                                                     โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_exporters.py                                                                     โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_models.py                                                                        โ”‚
+โ”‚     โ””โ”€โ”€ ๐Ÿ test_walker.py                                                                        โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+                 Generated by CodeMappr v1.0.0 ยท github.com/yourusername/codemappr
+โœ“ Exported Markdown report to: CODEMAPPR.md
+โœ“ Exported HTML report to: CODEMAPPR.html
+
+ + diff --git a/docs/screenshots/html-export.png b/docs/screenshots/html-export.png new file mode 100644 index 0000000..dc48430 Binary files /dev/null and b/docs/screenshots/html-export.png differ diff --git a/docs/screenshots/markdown-export.png b/docs/screenshots/markdown-export.png new file mode 100644 index 0000000..7ec4be9 Binary files /dev/null and b/docs/screenshots/markdown-export.png differ diff --git a/docs/screenshots/md_preview.html b/docs/screenshots/md_preview.html new file mode 100644 index 0000000..717e27b --- /dev/null +++ b/docs/screenshots/md_preview.html @@ -0,0 +1,87 @@ +
# CodeMappr Report โ€” app
+> Generated on 2026-05-20 03:28:26 by CodeMappr v1.0.0
+
+## Project Profile
+| Field | Value |
+| :--- | :--- |
+| Type | Python Package/Library |
+| Stack | HTML, Python |
+| Framework | โ€” |
+| Files | 45 |
+| Directories | 9 |
+| Size | 2.2 MB |
+
+## Architecture Summary
+This project is a Python Package/Library application developed in HTML, Python. It consists of 45 files across 9 directories. The codebase structure suggests it follows standard conventions for Python Package/Library development.
+
+## Folder Structure
+| Folder | Purpose |
+| :--- | :--- |
+| docs | Project documentation |
+| tests | Test suite |
+
+## Entry Points
+
+## Notable Files
+- pyproject.toml
+- .gitignore
+- README.md
+- LICENSE
+
+## Directory Tree
+```text
+๐Ÿ“ app
+โ”œโ”€โ”€ ๐Ÿ“ .github
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“ ISSUE_TEMPLATE
+โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ bug_report.md
+โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ feature_request.md
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md
+โ”‚   โ””โ”€โ”€ ๐Ÿ“ workflows
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ publish.yml
+โ”‚       โ””โ”€โ”€ ๐Ÿ“„ test.yml
+โ”œโ”€โ”€ ๐Ÿ“„ .gitignore
+โ”œโ”€โ”€ ๐Ÿ“„ CHANGELOG.md
+โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.html
+โ”œโ”€โ”€ ๐Ÿ“„ CODEMAPPR.md
+โ”œโ”€โ”€ ๐Ÿ“„ LICENSE
+โ”œโ”€โ”€ ๐Ÿ“„ README.md
+โ”œโ”€โ”€ ๐Ÿ“„ capture_screenshots.py
+โ”œโ”€โ”€ ๐Ÿ“ codemappr
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ __init__.py
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cli.py
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ detector.py
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ display.py
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ explainer.py
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ exporter.py
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ models.py
+โ”‚   โ””โ”€โ”€ ๐Ÿ“„ walker.py
+โ”œโ”€โ”€ ๐Ÿ“ codemappr.egg-info
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ entry_points.txt
+โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ requires.txt
+โ”‚   โ””โ”€โ”€ ๐Ÿ“„ top_level.txt
+โ”œโ”€โ”€ ๐Ÿ“ docs
+โ”‚   โ””โ”€โ”€ ๐Ÿ“ screenshots
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ DEMO.html
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ DEMO.md
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ README_SCREENSHOTS.md
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ format-all.png
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ format_all_output.html
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ html-export.png
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ markdown-export.png
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ md_preview.html
+โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ terminal-view.png
+โ”‚       โ””โ”€โ”€ ๐Ÿ“„ terminal_output.html
+โ”œโ”€โ”€ ๐Ÿ“„ generate_terminal_html.py
+โ”œโ”€โ”€ ๐Ÿ“„ pyproject.toml
+โ””โ”€โ”€ ๐Ÿ“ tests
+    โ”œโ”€โ”€ ๐Ÿ“„ __init__.py
+    โ”œโ”€โ”€ ๐Ÿ“„ conftest.py
+    โ”œโ”€โ”€ ๐Ÿ“„ test_detector.py
+    โ”œโ”€โ”€ ๐Ÿ“„ test_explainer.py
+    โ”œโ”€โ”€ ๐Ÿ“„ test_exporters.py
+    โ”œโ”€โ”€ ๐Ÿ“„ test_models.py
+    โ””โ”€โ”€ ๐Ÿ“„ test_walker.py
+```
\ No newline at end of file diff --git a/docs/screenshots/terminal-view.png b/docs/screenshots/terminal-view.png new file mode 100644 index 0000000..83fad47 Binary files /dev/null and b/docs/screenshots/terminal-view.png differ diff --git a/docs/screenshots/terminal_output.html b/docs/screenshots/terminal_output.html new file mode 100644 index 0000000..7ae7837 --- /dev/null +++ b/docs/screenshots/terminal_output.html @@ -0,0 +1,104 @@ + + + + + + + +
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚ CodeMappr                                                                                        โ”‚
+โ”‚ Codebase Intelligence                                                                            โ”‚
+โ”‚ app                                                                                              โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Project Profile โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚  Type         Python Package/Library                                                             โ”‚
+โ”‚  Stack        Python                                                                             โ”‚
+โ”‚  Framework    โ€”                                                                                  โ”‚
+โ”‚  Total Files  33                                                                                 โ”‚
+โ”‚  Total Dirs   9                                                                                  โ”‚
+โ”‚  Size         175.5 KB                                                                           โ”‚
+โ”‚  Confidence   medium                                                                             โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Architecture Summary โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚ This project is a Python Package/Library application developed in Python. It consists of 33      โ”‚
+โ”‚ files across 9 directories. The codebase structure suggests it follows standard conventions for  โ”‚
+โ”‚ Python Package/Library development.                                                              โ”‚
+โ”‚                                                                                                  โ”‚
+โ”‚ Key Folders:                                                                                     โ”‚
+โ”‚ ๐Ÿ“ docs โ†’ Project documentation                                                                  โ”‚
+โ”‚ ๐Ÿ“ tests โ†’ Test suite                                                                            โ”‚
+โ”‚                                                                                                  โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Entry Points โ”€โ•ฎ โ•ญโ”€ Notable Files โ”€โ”€โ”€โ•ฎ
+โ”‚                โ”‚ โ”‚ ๐Ÿ“„ pyproject.toml โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ โ”‚ ๐Ÿ“„ .gitignore     โ”‚
+                   โ”‚ ๐Ÿ“„ README.md      โ”‚
+                   โ”‚ ๐Ÿ“„ LICENSE        โ”‚
+                   โ”‚                   โ”‚
+                   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+โ•ญโ”€ Directory Tree โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
+โ”‚ ๐Ÿ“ app                                                                                           โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ .github                                                                                   โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“ ISSUE_TEMPLATE                                                                        โ”‚
+โ”‚ โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ bug_report.md                                                                     โ”‚
+โ”‚ โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ feature_request.md                                                                โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md                                                              โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ“ workflows                                                                             โ”‚
+โ”‚ โ”‚       โ”œโ”€โ”€ โš™๏ธ publish.yml                                                                       โ”‚
+โ”‚ โ”‚       โ””โ”€โ”€ โš™๏ธ test.yml                                                                          โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ .gitignore                                                                                โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ CHANGELOG.md                                                                              โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ LICENSE                                                                                   โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ README.md                                                                                 โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ codemappr                                                                                 โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ __init__.py                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ cli.py                                                                                โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ detector.py                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ display.py                                                                            โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ explainer.py                                                                          โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ exporter.py                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ models.py                                                                             โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ walker.py                                                                             โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ codemappr.egg-info                                                                        โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ PKG-INFO                                                                              โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ SOURCES.txt                                                                           โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ dependency_links.txt                                                                  โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ entry_points.txt                                                                      โ”‚
+โ”‚ โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ requires.txt                                                                          โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ“„ top_level.txt                                                                         โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ“ docs                                                                                      โ”‚
+โ”‚ โ”‚   โ””โ”€โ”€ ๐Ÿ“ screenshots                                                                           โ”‚
+โ”‚ โ”‚       โ””โ”€โ”€ ๐Ÿ“„ README_SCREENSHOTS.md                                                             โ”‚
+โ”‚ โ”œโ”€โ”€ ๐Ÿ generate_terminal_html.py                                                                 โ”‚
+โ”‚ โ”œโ”€โ”€ โš™๏ธ pyproject.toml                                                                            โ”‚
+โ”‚ โ””โ”€โ”€ ๐Ÿ“ tests                                                                                     โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ __init__.py                                                                           โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ conftest.py                                                                           โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_detector.py                                                                      โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_explainer.py                                                                     โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_exporters.py                                                                     โ”‚
+โ”‚     โ”œโ”€โ”€ ๐Ÿ test_models.py                                                                        โ”‚
+โ”‚     โ””โ”€โ”€ ๐Ÿ test_walker.py                                                                        โ”‚
+โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
+                 Generated by CodeMappr v1.0.0 ยท github.com/yourusername/codemappr
+
+ + diff --git a/generate_terminal_html.py b/generate_terminal_html.py new file mode 100644 index 0000000..dbcf471 --- /dev/null +++ b/generate_terminal_html.py @@ -0,0 +1,24 @@ +import os +from rich.console import Console +from typer.testing import CliRunner +import codemappr.display +import codemappr.cli +from codemappr.cli import app + +def generate_terminal_screenshot(): + console = Console(record=True, width=100, force_terminal=True) + + # Patch consoles + codemappr.display.console = console + codemappr.cli.console = console + + runner = CliRunner() + # Run scan + runner.invoke(app, ["scan", "."]) + + # Save HTML + console.save_html("docs/screenshots/terminal_output.html", theme=None) # Default dark theme + +if __name__ == "__main__": + os.makedirs("docs/screenshots", exist_ok=True) + generate_terminal_screenshot() diff --git a/pyproject.toml b/pyproject.toml index bdd6c47..f6143b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,11 +9,23 @@ description = "Instantly understand any codebase." readme = "README.md" requires-python = ">=3.9" license = {text = "MIT"} +keywords = ["cli", "codebase", "documentation", "developer-tools", "static-analysis", "project-analysis"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Topic :: Software Development :: Documentation", + "Topic :: Utilities", +] dependencies = [ "typer[all]", "rich", ] +[project.urls] +Homepage = "https://github.com/yourusername/codemappr" +Repository = "https://github.com/yourusername/codemappr" + [project.scripts] codemappr = "codemappr.cli:app"