Skip to main content

Powerful Rust package that parse codebase to extract relevant metadatas in tree structure.

Project description

basecollab

basecollab is a Python package that scans a Git-tracked codebase for lines matching TODO: and returns a JSON tree you can render as an elegant “tree view” grouped by top-level folders.

What is currently scanned : TODO: or TODO : It is being enriched with git blame metadata (commit id, author, timestamp) so you can quickly see who wrote it and when.

Install

pip install basecollab

Usage

Minimal example (same as test.py):

import json

import basecollab

raw = basecollab.scan_py(
    selected_dirs=None,
    excluded_dirs=None,
    excluded_extensions=None,
    file_size_limit_mb=None,
)

data = json.loads(raw)
count = sum(len(section.get("children", [])) for section in data)
print(f"Found {count} TODOs")
print(json.dumps(data, indent=2))

Parameters

basecollab.scan_py(...) accepts:

  • selected_dirs: list[str] | None — directories to scan (relative to the repo root). None scans the whole repo.
  • excluded_dirs: list[str] | None — directory names to skip (example: ".git", "node_modules").
  • excluded_extensions: list[str] | None — file extensions to skip (example: "png", "zip").
  • file_size_limit_mb: int | None — skip files larger than this size.

Output format (tree view)

The function returns a JSON array of section nodes, one per top-level folder.

Each section node:

{
  "type": "section",
  "name": "./backend",
  "children": [
    {
      "file_path": "./backend/example",
      "line_number": 1,
      "line_content": "Enhance function Caller() in backend",
      "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
      "git_author": "ccouble",
      "git_timestamp": "2025-12-27T01:36:11Z"
    }
  ]
}

Full output example

[
  {
    "type": "section",
    "name": "./backend",
    "children": [
      {
        "file_path": "./backend/example",
        "line_number": 1,
        "line_content": "Enhance function Caller() in backend",
        "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
        "git_author": "ccouble",
        "git_timestamp": "2025-12-27T01:36:11Z"
      }
    ]
  },
  {
    "type": "section",
    "name": "./frontend",
    "children": [
      {
        "file_path": "./frontend/example2",
        "line_number": 1,
        "line_content": "Enhance UI / UX of button {Y}",
        "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
        "git_author": "ccouble",
        "git_timestamp": "2025-12-27T01:36:11Z"
      },
      {
        "file_path": "./frontend/example",
        "line_number": 1,
        "line_content": "Enhance UI / UX of button {X}",
        "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
        "git_author": "ccouble",
        "git_timestamp": "2025-12-27T01:36:11Z"
      }
    ]
  }
]

Notes

  • Only TODOs in files that are part of the Git working tree are reported.
  • Only lines matching TODO: are captured; the returned line_content is the text after TODO:.

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

basecollab-0.1.4.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

basecollab-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

File details

Details for the file basecollab-0.1.4.tar.gz.

File metadata

  • Download URL: basecollab-0.1.4.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for basecollab-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f62585006cd0611d0f5c018cc730848b3998a2e7c5500f10e1b9cdfe2c1f1d95
MD5 19ee2b850956579d2529d9655d7c6269
BLAKE2b-256 56786d2d2de37fb0bacaf65c47ac8d8062f422b6ff6839b1b434463cbb284c17

See more details on using hashes here.

File details

Details for the file basecollab-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for basecollab-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6d44efbfc7b1ffe832364f3c4c082369fd0c1b1d0841c97233e9c1c495a8e7c4
MD5 bc946aaacb437d34a084c3a132307454
BLAKE2b-256 29459e08f0b79ae41c8c8a0e6c68daebdfd89179fa4dc49f66d4eacad1061027

See more details on using hashes here.

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