A simple yet powerful desktop application built with Python and Tkinter that generates a clean, tree-style representation of a directory's structure. It includes file-type specific icons (emojis) and a one-click "copy to clipboard" feature, making it easy to document and share your project's layout.
- Graphical User Interface: An intuitive and easy-to-use interface that doesn't require any command-line knowledge to operate.
- Iconic Tree View: Generates a visually appealing tree structure using modern emojis to represent folders and different file types.
- Smart Folder Exclusion: Automatically ignores common, high-volume directories like
.gitandnode_modulesto keep the output clean and relevant. - Copy to Clipboard: A dedicated button to instantly copy the entire generated tree structure to your clipboard.
- Easy Customization: Key settings like icons, ignored directories, and scan depth can be easily modified directly in the source code.
- Cross-Platform: Built with standard Python libraries, it should run on Windows, macOS, and Linux.
- Python 3.x
- Tkinter: This library is included in most standard Python installations, so no separate installation is usually required.
-
Clone the repository:
git clone https://github.com/hanggaa/python-explorer.git cd python-explorer -
Run the application:
python explorer.py
-
Select a Directory: Click the "Select Directory to View" button and choose the root folder you want to analyze.
-
View and Copy: The directory tree will instantly appear in the text area. Click the "Copy Output to Clipboard" button to copy the entire structure.
You can easily customize the application's behavior by editing the configuration variables at the top of the .py file.
-
Change Icons: Add or modify file extension icons in the
FILE_ICONSdictionary.FILE_ICONS = { '.py': 'π', '.js': 'π', '.html': 'π', # ... and so on }
-
Ignore More Directories: Add new folder names to the
IGNORE_DIRSset.IGNORE_DIRS = {'.git', 'node_modules', 'venv', '__pycache__', 'dist'}
-
Adjust Scan Depth: Change the
MAX_DEPTHvalue to scan more or fewer levels deep.MAX_DEPTH = 3 # e.g., change to 4 to go one level deeper
This project is licensed under the MIT License.
