Welcome to the HelperScripts repository! This repository contains small scripts that help with everyday tasks or can be useful for various workflows. Currently, it includes two scripts, both licensed under the GNU General Public License v3.0 (GPL-3.0):
This script generates a directory tree for a specified path, excluding certain directories and files. The result is saved in a text file (project_tree.txt).
- Recursively scans the specified root folder and all of its subfolders.
- Certain directories (e.g.,
bin
,obj
,.git
, etc.) are excluded by default. - Certain files or file extensions (e.g.,
*.dll
,*.pdb
,*.exe
) are also excluded by default. - The generated directory tree is saved in a file named
project_tree.txt
located in the provided project path.
- Run the script:
python generate_filtered_tree.py
- Enter the project path: Once started, you will be prompted to input the path where the directory tree should be generated.
- Result: The output is saved as
project_tree.txt
in the same directory you provided.
Feel free to customize the lists of directories and files to exclude according to your needs.
This script recursively collects files of specified extensions (e.g., .cs
, .py
) within a project directory, cleans them based on file-type-specific rules, and aggregates their content into a single output. If possible, it also copies the final text to the clipboard.
- Recursively searches through all folders, skipping certain generated directories (e.g.,
bin
,obj
,Resources
,Assets
, etc.). - Processes files matching the specified extensions (e.g.,
.cs
,.py
) and applies file-specific cleanup:- .cs files: Removes all lines starting with
using
and deletes any empty lines before the first occurrence of a line starting withnamespace
.
- .cs files: Removes all lines starting with
- Outputs the aggregated result to the console and copies it to the clipboard if the
pyperclip
module is available.
-
Run the script:
python code_summarizer.py <path> <extension1> [<extension2> ...]
- : The base folder to search through (e.g., the root directory of a .NET solution).
- [ ...]: The file types you want to process (e.g.,
.cs
,.py
).
-
Example:
python code_summarizer.py "C:/Projects/MySolution" .cs .py
-
Output:
- The script prints the aggregated text of all processed files to the console.
- If
pyperclip
is installed, the script also copies the text to your clipboard.
This repository is licensed under the GNU General Public License v3.0 (GPL-3.0).
Please note that when redistributing or publishing your changes, you must adhere to the GPL-3.0 requirements, including giving appropriate credit to the original authors.
If you have suggestions for additional useful scripts or enhancements, feel free to create an Issue or open a Pull Request:
- Fork this repository
- Implement your feature or fix
- Open a Pull Request
For questions or feedback, please open an Issue or reach out directly.
Enjoy using HelperScripts!