-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateProjectStructure.ps1
More file actions
42 lines (37 loc) · 1.57 KB
/
CreateProjectStructure.ps1
File metadata and controls
42 lines (37 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Ermitteln des Verzeichnisses, in dem dieses Skript liegt
$root = $PSScriptRoot
# Liste der zu erstellenden Verzeichnisse (relative Pfade)
$directories = @(
"$root\src",
"$root\resources",
"$root\tests",
"$root\docs",
"$root\.github\workflows"
)
# Erstelle alle Verzeichnisse, sofern sie noch nicht existieren
foreach ($dir in $directories) {
if (-not (Test-Path $dir)) {
New-Item -Path $dir -ItemType Directory | Out-Null
}
}
# Liste der zu erstellenden Dateien mit Pfadangaben (relative Pfade)
$files = @(
"$root\src\__init__.py",
"$root\src\main.py", # Hauptanwendung (GUI-Code, z.B. Tkinter)
"$root\resources\Config.json", # Konfigurationsdatei (z.B. zuletzt genutzter Projektordner)
"$root\resources\Exclude.json", # Exclude-Datei (editierbar über die GUI)
"$root\tests\__init__.py",
"$root\tests\test_main.py", # Unit-Tests für die Module
"$root\docs\README.md", # Dokumentation, Architektur, etc.
"$root\.github\workflows\release.yml", # GitHub Actions Workflow für automatisierte Releases
"$root\requirements.txt", # Abhängigkeiten (z.B. tkinter, pyinstaller, ...)
"$root\README.md", # Projektbeschreibung und Anleitung
"$root\setup.py" # (Optional) Für Packaging/Installation
)
# Erstelle alle Dateien (leere Dateien, falls sie noch nicht existieren)
foreach ($file in $files) {
if (-not (Test-Path $file)) {
New-Item -Path $file -ItemType File | Out-Null
}
}
Write-Host "Projektstruktur wurde im Root-Verzeichnis '$root' erstellt."