{"id":20581035,"url":"https://github.com/http-kennedy/dev_crawl","last_synced_at":"2025-04-14T19:51:13.962Z","repository":{"id":214005882,"uuid":"725774478","full_name":"http-kennedy/dev_crawl","owner":"http-kennedy","description":"dev_crawl is a versatile Python debugging automation tool designed to simplify and streamline the debugging process for Python developers. It automatically injects debugging statements into Python scripts, including nested and interdependent scripts, ensuring a thorough and efficient debugging experience.","archived":false,"fork":false,"pushed_at":"2024-06-26T20:03:02.000Z","size":1264,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T08:11:27.089Z","etag":null,"topics":["automation","debugging","logic-flow","python","workflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/http-kennedy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-30T21:06:42.000Z","updated_at":"2024-06-26T20:03:05.000Z","dependencies_parsed_at":"2023-12-25T04:31:10.151Z","dependency_job_id":"79fe10cd-7f76-47e6-b798-5b50b7be092e","html_url":"https://github.com/http-kennedy/dev_crawl","commit_stats":null,"previous_names":["http-kennedy/dev_crawl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-kennedy%2Fdev_crawl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-kennedy%2Fdev_crawl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-kennedy%2Fdev_crawl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/http-kennedy%2Fdev_crawl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/http-kennedy","download_url":"https://codeload.github.com/http-kennedy/dev_crawl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248951597,"owners_count":21188414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","debugging","logic-flow","python","workflow"],"created_at":"2024-11-16T06:26:45.866Z","updated_at":"2025-04-14T19:51:13.930Z","avatar_url":"https://github.com/http-kennedy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dev_crawl.py - Python Debugging Automation Tool\n\n## Introduction\n`dev_crawl.py` is a lightweight Python automation tool designed to streamline the debugging process by generating an output of logic flow during _debug script execution. It performs this by injecting debugging statements, managing debug logs, and intelligently handles nested scripts and their imports.\n\n  - **Main use of this tool is to create a visual representation of the logic flow of a python script, including the order in which functions were called and the number of times each function was called.**\n  - This can be useful for identifying performance bottlenecks or other issues.\n\n## Key Features\n- **Automated Debugging Statement Injection:** Automates the insertion of logic flow statements into Python scripts, extending support to nested and interdependent scripts.\n- **Selective Import Modification:** Dynamically modifies import statements in scripts to include their debug-enhanced versions, but only for scripts specified in the same run.\n- **Simultaneous Multiple Script Handling:** Efficiently processes multiple scripts in a single run, respecting their dependencies and nesting.\n- **Versatile Debug Log Management:** Offers options for terminal output, debug.log output, custom debug log file, and log reformatting for enhanced readability or markdown conversion.\n\n## Requirements\n- Python 3.6 or later\n- `astor` library\n\n## Installation\nClone the repository from GitHub and install the dependency:\n\n```bash\ngit clone https://github.com/http-kennedy/dev_crawl\ncd dev_crawl\npip install -r requirements.txt\n```\n\n## Workflow and Usage\n  ```bash\n  python dev_crawl.py --h\n  ```\n\n### Single and Multiple Script Modification\n- **Single Script:**\n  ```bash\n  python dev_crawl.py script1.py\n  ```\n- **Multiple Scripts:**\n  ```bash\n  python dev_crawl.py script1.py script2.py\n  ```\n- **Hierarchical Dependencies:**\n  ```bash\n  python dev_crawl.py script1.py script2.py /utils/script3.py\n  ```\n\n### Output Options\n- **Default (Print to Terminal):**\n  - Outputs debug information to the terminal.\n  ```bash\n  python dev_crawl.py script1.py\n  ```\n- **Using `--debug-to-file`:**\n  - Directs debug outputs to `debug.log` in the current working directory.\n  ```bash\n  python dev_crawl.py --debug-to-file script1.py\n  ```\n  - **Custom Log Location with `--output-file`:**\n    - Specifies a custom file path for the debug log.\n    ```bash\n    python dev_crawl.py --debug-to-file --output-file /path/to/custom_log.log script1.py\n    ```\n  - **Reformatting `debug.log`:**\n    - Converts `debug.log` to a readable format.\n    ```bash\n    python dev_crawl.py --reformat-log /path/to/debug.log\n    ```\n  - **Markdown Conversion:**\n    - Transforms `debug.log` into markdown format.\n    ```bash\n    python dev_crawl.py --reformat-log-md /path/to/debug.log\n    ```\n\n### Overwrite Confirmation and Non-Interactive Mode\n  - **Overwrite Confirmation:**\n    - Prompts for confirmation before overwriting existing files.\n  - **Non-Interactive Mode with `--non-interactive`:**\n    - Automatically overwrites existing files without confirmation.\n    ```bash\n    python dev_crawl.py --non-interactive --debug-to-file --output-file /path/to/debug.log script1.py\n    ```\n\n### Resetting `debug.log`\n  - **Default Reset:**\n    - Re-initializes `debug.log` in the current directory.\n    ```bash\n    python dev_crawl.py --clear-debug-log\n    ```\n  - **Custom Log Location**\n    - Resets a custom debug log file at the specified path.\n    ```bash\n    python dev_crawl.py --clear-debug-log /path/to/debug.log\n    ```\n\n## Defaults for `debug.log`\n  - The following arguments default to current working directory for `debug.log`\n  - `--debug-to-file`\n  - `--reformat-log`\n  - `--reformat-log-md`\n  - `--clear-debug-log`\n\n## Screenshots\n\n\u003cdetails\u003e\n  \u003csummary\u003eBasic Debug Log (Click to Expand)\u003c/summary\u003e\n  \u003ca href=\"screenshots/debug_log.png\"\u003e\n    \u003cimg src=\"screenshots/debug_log.png\" alt=\"Basic Debug Log\" width=\"500\"/\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eBasic Markdown Output (Click to Expand)\u003c/summary\u003e\n  \u003ca href=\"screenshots/markdown_log_basic.png\"\u003e\n    \u003cimg src=\"screenshots/markdown_log_basic.png\" alt=\"Basic Markdown Output\" width=\"500\"/\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eFull Markdown View (Click to Expand)\u003c/summary\u003e\n  \u003ca href=\"screenshots/markdown_log_full.png\"\u003e\n    \u003cimg src=\"screenshots/markdown_log_full.png\" alt=\"Full Markdown View\" width=\"500\"/\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eDetailed Execution Flow (Click to Expand)\u003c/summary\u003e\n  \u003ca href=\"screenshots/markdown_detailed.png\"\u003e\n    \u003cimg src=\"screenshots/markdown_detailed.png\" alt=\"Full Markdown View\" width=\"500\"/\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\n## Intelligent Import Handling\n`dev_crawl.py` intelligently adjusts import statements in scripts to refer to their debug versions, but only when an import name matches the script name passed to dev_crawl.py at the same modification execution. This ensures that debug modifications are applied consistently across interrelated scripts.\n\n## Contributing\nI welcome contributions to improve `dev_crawl.py`. Please submit pull requests or open issues for discussion.\n\n## License\n`dev_crawl.py` is released under the CC0-1.0 License. Please see the LICENSE file for full license details.\n\n## Contact\nFor questions or feedback, please open an issue in the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttp-kennedy%2Fdev_crawl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttp-kennedy%2Fdev_crawl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttp-kennedy%2Fdev_crawl/lists"}