Directory Logger is a powerful and flexible tool for generating detailed logs of directory structures and file metadata. It offers both a command-line interface and a graphical user interface, making it suitable for various use cases and user preferences.
- Log directory structures with detailed file metadata
- Filter files by extension
- Control logging depth
- Multiple output formats (text, JSON, CSV, XML)
- Concurrent processing for improved performance
- Progress tracking
- Configurable logging
- User-friendly GUI with dark mode
- Save and load configurations
-
Clone the repository:
git clone https://github.com/Xza85hrf/Directory-Logger.git cd directory-logger
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
Run the directory logger from the command line:
python dir_log_gen.py /path/to/directory /path/to/logfile.txt [options]
Options:
--extension
: Filter files by extension (e.g., .txt)--max-depth
: Maximum depth of directory traversal--format
: Output format (text, json, csv, xml)--console
: Print log to console--verbose
: Enable verbose mode--config
: Path to configuration file
Launch the GUI application:
python dir_log_gui.py
The GUI provides an intuitive interface for setting up and running the directory logger.
You can save and load configurations using the GUI. Configurations are stored in JSON format and include:
- Directory path
- Log file path
- File extension filter
- Maximum depth
- Output format
Run the unit tests using:
python -m unittest dir_log_utests.py
This project follows the PEP 8 style guide. Use black
for code formatting and flake8
for linting:
black .
flake8
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.