diff --git a/.gitattributes b/.gitattributes
index 2da9bcf..898094c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,29 +1,9 @@
-*.md linguist-vendored=false
-*.md linguist-generated=false
-*.md linguist-documentation=false
-*.md linguist-detectable=true
-
*.json linguist-vendored=false
*.json linguist-generated=false
*.json linguist-documentation=false
*.json linguist-detectable=true
-*.yml linguist-vendored=false
-*.yml linguist-generated=false
-*.yml linguist-documentation=false
-*.yml linguist-detectable=true
-
-*.ini linguist-vendored=false
-*.ini linguist-generated=false
-*.ini linguist-documentation=false
-*.ini linguist-detectable=true
-
*.txt linguist-vendored=false
*.txt linguist-generated=false
*.txt linguist-documentation=false
*.txt linguist-detectable=true
-
-*.xml linguist-vendored=false
-*.xml linguist-generated=false
-*.xml linguist-documentation=false
-*.xml linguist-detectable=true
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..a1ca617
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+custom: [ buymeacoffee.com/cursedentertainment, ko-fi.com/cursedentertainment ]
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..6b76b4f
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,15 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Python Debugger: Current File",
+ "type": "debugpy",
+ "request": "launch",
+ "program": "${file}",
+ "console": "integratedTerminal"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index ca9aa40..acf97b3 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,76 @@
+[](https://x.com/NorowaretaGemu)
+[](https://opensource.org/licenses/MIT)
+
+
+
+
+
+
+
+
+# Python-Template
+
+## How to Run:
-# Cursed-Python-Template
+### Install Requirements
+Using Python directly:
```bash
pip install -r requirements.txt
```
-To make the setup script executable, run the following command in your terminal:
+Or run:
+- `install_requirements.bat`
+
+
+
+
+### Run main.py
+
+Using Python directly:
+
+```bash
+python main.py
+```
+
+Using provided scripts:
+
+Windows:
+- `.\run.bat`
+or
+- `.\run.ps1`
+
+Unix-like systems (Linux/macOS):
+- `.\run.sh`
+
+
+
+## Requirements:
```bash
-chmod +x setup.sh
+
```
+
+
+© Cursed Entertainment 202*
+
+
+
diff --git a/config.ini b/__init__.py
similarity index 100%
rename from config.ini
rename to __init__.py
diff --git a/clear-commits.bat b/clear-commits.bat
new file mode 100644
index 0000000..75f9428
--- /dev/null
+++ b/clear-commits.bat
@@ -0,0 +1,18 @@
+@echo off
+REM Switch to a new orphan branch
+git checkout --orphan new_branch
+
+REM Stage all changes
+git add .
+
+REM Commit changes
+git commit -m "new_commit"
+
+REM Delete the old main branch
+git branch -D main
+
+REM Rename the new branch to main
+git branch -m main
+
+REM Force push to the remote main branch
+git push -f origin main
diff --git a/clear-commits.ps1 b/clear-commits.ps1
new file mode 100644
index 0000000..db7f511
--- /dev/null
+++ b/clear-commits.ps1
@@ -0,0 +1,17 @@
+# Switch to a new orphan branch
+git checkout --orphan new_branch
+
+# Stage all changes
+git add .
+
+# Commit changes
+git commit -m "new_commit"
+
+# Delete the old main branch
+git branch -D main
+
+# Rename the new branch to main
+git branch -m main
+
+# Force push to the remote main branch
+git push -f origin main
\ No newline at end of file
diff --git a/clear-commits.py b/clear-commits.py
new file mode 100644
index 0000000..2654a11
--- /dev/null
+++ b/clear-commits.py
@@ -0,0 +1,28 @@
+import subprocess
+
+def run_command(command):
+ """Run a command in the shell and print the output."""
+ try:
+ result = subprocess.run(command, check=True, text=True, capture_output=True)
+ print(result.stdout)
+ except subprocess.CalledProcessError as e:
+ print(f"Error: {e.stderr}")
+ exit(1)
+
+# Switch to a new orphan branch
+run_command(["git", "checkout", "--orphan", "new_branch"])
+
+# Stage all changes
+run_command(["git", "add", "."])
+
+# Commit changes
+run_command(["git", "commit", "-m", "new_commit"])
+
+# Delete the old main branch
+run_command(["git", "branch", "-D", "main"])
+
+# Rename the new branch to main
+run_command(["git", "branch", "-m", "main"])
+
+# Force push to the remote main branch
+run_command(["git", "push", "-f", "origin", "main"])
\ No newline at end of file
diff --git a/clear-commits.sh b/clear-commits.sh
new file mode 100644
index 0000000..2c62b8f
--- /dev/null
+++ b/clear-commits.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Switch to a new orphan branch
+git checkout --orphan new_branch
+
+# Stage all changes
+git add .
+
+# Commit changes
+git commit -m "new_commit"
+
+# Delete the old main branch
+git branch -D main
+
+# Rename the new branch to main
+git branch -m main
+
+# Force push to the remote main branch
+git push -f origin main
\ No newline at end of file
diff --git a/config.json b/config.json
index cb92a2e..bfaf138 100644
--- a/config.json
+++ b/config.json
@@ -1,3 +1,13 @@
{
+ "Config": {
+ "AppName": "TemplateProject",
+ "Description": "",
+ "ProjectStructure": {
+ "MainScript": "main.py",
+ "DependenciesScript": "scripts/install-dependencies.py"
+ },
+ "Scripts": {
-}
\ No newline at end of file
+ }
+ }
+ }
\ No newline at end of file
diff --git a/config.xml b/config.xml
deleted file mode 100644
index b2a5caa..0000000
--- a/config.xml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/install_requirements.bat b/install_requirements.bat
new file mode 100644
index 0000000..20fa101
--- /dev/null
+++ b/install_requirements.bat
@@ -0,0 +1,3 @@
+@echo off
+pip install -r requirements.txt
+pause
diff --git a/main.py b/main.py
index 6af73ad..3b84509 100644
--- a/main.py
+++ b/main.py
@@ -1,8 +1,16 @@
import os
import subprocess
+import json
def main():
- print("Python Project")
+ with open('config.json') as json_file:
+ config_data = json.load(json_file)
+
+ # Get the project name from the JSON data
+ app_name = config_data.get('Config', {}).get('AppName', 'default_app')
+
+ # Print the actual app name value
+ print(app_name)
scripts = {
"1": {
@@ -16,9 +24,9 @@ def main():
"file_name": "scripts/script01.py"
},
"00": {
- "name": "Run 'Install Dependencies'",
+ "name": "Run 'install_dependencies.py'",
"description": "Install dependencies",
- "file_name": "scripts/install-dependencies.py"
+ "file_name": "scripts/install_dependencies.py"
},
}
diff --git a/run.ps1 b/run.ps1
new file mode 100644
index 0000000..e439efd
--- /dev/null
+++ b/run.ps1
@@ -0,0 +1,15 @@
+# Define the virtual environment directory
+$VENV_DIR = "psdenv"
+
+# Check if the virtual environment directory exists
+if (-Not (Test-Path $VENV_DIR)) {
+ # Create the virtual environment
+ python -m venv $VENV_DIR
+}
+
+# Activate the virtual environment and run the Python script
+& "$VENV_DIR\Scripts\Activate.ps1"
+python main.py
+
+# Pause for user input before closing (optional)
+Read-Host "Press Enter to continue..."
diff --git a/run.sh b/run.sh
new file mode 100644
index 0000000..21e00e0
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+VENV_DIR="psdenv"
+
+# Check if the virtual environment directory exists
+if [ ! -d "$VENV_DIR" ]; then
+ # Create the virtual environment
+ python -m venv "$VENV_DIR"
+fi
+
+# Activate the virtual environment and run the Python script
+source "$VENV_DIR/bin/activate"
+python main.py
+
+# Pause for user input before closing (optional)
+read -p "Press Enter to continue..."
\ No newline at end of file
diff --git a/scripts/__init__.py b/scripts/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/scripts/install-dependencies.py b/scripts/install_dependencies.py
similarity index 100%
rename from scripts/install-dependencies.py
rename to scripts/install_dependencies.py
diff --git a/settings.json b/settings.json
new file mode 100644
index 0000000..e69de29
diff --git a/setup.ps1 b/setup.ps1
new file mode 100644
index 0000000..09ac92c
--- /dev/null
+++ b/setup.ps1
@@ -0,0 +1,6 @@
+# Create a Python virtual environment
+python -m venv psdenv
+
+# Activate the virtual environment and run the Python script
+& ".\psdenv\Scripts\Activate.ps1"
+python main.py