| .vscode | ||
| doc | ||
| projectinitializer | ||
| .gitignore | ||
| projectinitializer.ico | ||
| projectinitializer.spec | ||
| README.md | ||
| requirements.txt | ||
Project Initializer Tool
A Python application to initialize standard project structures for new Python projects, suitable for use with Git.
Features
- Creates a defined directory structure for source code (
project_name/core,project_name/gui). - Generates basic files:
__init__.py,__main__.py,core.py,gui.py. - Creates a
doc/directory with templateEnglish-manual.mdandItalian-manual.md. - Generates a basic
README.mdfor the new project. - Generates a
.specfile template for PyInstaller. - Copies a default
.icofile. - Creates a standard
.gitignorefile. - Initializes a local Git repository with an initial commit.
- Supports both Command Line Interface (CLI) and Graphical User Interface (GUI) via Tkinter.
- Remembers the last used root directory for convenience in GUI mode.
Structure of this Tool (ProjectInitializerTool)
This tool itself is organized as follows:
project_initializer/: Main Python package for the tool.__main__.py: Entry point (python -m project_initializer).core/: Core logic for project creation.project_creator.py: Handles the actual file and directory generation.
config/: Configuration and file templates.settings.py: Manages app config (like last used directory) and stores file templates.
gui/: Tkinter GUI components.app_window.py: Defines the main application window.
cli/: Command-line interface components.interface.py: Handles argument parsing and CLI interaction.
assets/: Static assets for the tool.default_icon.ico: The default icon copied to new projects.
Usage
Prerequisites
- Python 3.7+ (ideally 3.8+ for
pathlibfeatures and type hinting usage) - Git (optional, for repository initialization in new projects)
Running the Tool
-
Navigate to the
ProjectInitializerTooldirectory (the one containing this README). -
Execute the tool using the Python module execution:
GUI Mode (Recommended for interactive use):
python -m project_initializerThis will launch the graphical interface.
CLI Mode (For scripting or command-line preference):
python -m project_initializer <root_directory> <ProjectName><root_directory>: The directory where the new project folder (named<ProjectName>) will be created.<ProjectName>: The desired name for your new project (e.g., "MyNewApp").
Example:
python -m project_initializer /home/user/dev/projects MyCoolProjectThis will create a folder
/home/user/dev/projects/MyCoolProjectwith the standard structure.
Configuration
The tool saves the last used root directory in a configuration file (.project_initializer_config.json) in your user's home directory.
Development (of this ProjectInitializerTool)
- Ensure you have Python installed.
- The
default_icon.icofile should be present inproject_initializer/assets/. - To run during development:
python -m project_initializerfrom theProjectInitializerTooldirectory.