File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Super-opinionated Python stack for fast development. Python >= 3.12 required. Us
1010
1111``` bash
1212# Setup & Run
13+ make init name=... description=... # Initialize project name and description
1314make setup # Create/update .venv and sync dependencies
1415make all # Run main.py with setup
1516
Original file line number Diff line number Diff line change @@ -32,10 +32,24 @@ help: ## Show this help message
3232 }' $(MAKEFILE_LIST)
3333
3434# #######################################################
35- # Initialization: Delete later
35+ # Initialization
3636# #######################################################
3737
3838# ## Initialization
39+ .PHONY : init banner logo
40+ init : # # Initialize project (usage: make init name=my-project description="my description")
41+ @if [ -z " $( name) " ] || [ -z " $( description) " ]; then \
42+ echo " $( RED) Error: Both 'name' and 'description' parameters are required$( RESET) " ; \
43+ echo " Usage: make init name=<project_name> description=<project_description>" ; \
44+ exit 1; \
45+ fi
46+ @echo " $( YELLOW) 🚀 Initializing project $( name) ...$( RESET) "
47+ @sed -i.bak " s/name = \" python-template\" /name = \" $( name) \" /" pyproject.toml && rm pyproject.toml.bak
48+ @sed -i.bak " s/description = \" Add your description here\" /description = \" $( description) \" /" pyproject.toml && rm pyproject.toml.bak
49+ @sed -i.bak " s/# Python-Template/# $( name) /" README.md && rm README.md.bak
50+ @sed -i.bak " s/<b>Opinionated Python project stack. 🔋 Batteries included. <\/b>/<b>$( description) <\/b>/" README.md && rm README.md.bak
51+ @echo " $( GREEN) ✅ Updated project name and description.$( RESET) "
52+
3953banner : check_uv # # Generate project banner image
4054 @echo " $( YELLOW) 🔍Generating banner...$( RESET) "
4155 @uv run python -m init.generate_banner
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ Opinionated Python stack for fast development. The `saas` branch extends `main`
5555
5656## Quick Start
5757
58+ - ` make init name=my-project description="My project description" ` - initialize project
5859- ` make all ` - runs ` main.py `
5960- ` make fmt ` - runs ` ruff format ` + JSON formatting
6061- ` make banner ` - create a new banner that makes the README nice 😊
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments