Skip to content

Commit bef646f

Browse files
Added more of my projects to the repo
1 parent 06f5acc commit bef646f

40 files changed

Lines changed: 4015 additions & 112 deletions

PowerShell-Script_Archive/Development & IT Tools/Script to txt - json - xml -- Converter/EliteScriptConverter.ps1

Lines changed: 643 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<a id="readme-top"></a>
2+
3+
<!-- EliteSoftware Co. LOGO -->
4+
5+
<br />
6+
<div align="center">
7+
<!-- <a href="Logo"> -->
8+
<!-- <img src="https://i.postimg.cc/85MDTcrJ/Elite-Software-LOGO-Mocup2.png" alt="Logo" width="256" height="256"> -->
9+
<!-- </a> -->
10+
</div>
11+
12+
<!-- ABOUT THE PROJECT -->
13+
14+
# 💾 About The Project <div align="center">
15+
16+
## EliteScriptConverter
17+
18+
`EliteScriptConverter` is a Windows Forms application developed in PowerShell designed to batch convert script files (specifically `.ps1` and `.py`) into various text-based formats such as JSON, TXT, and XML. This tool aids in data portability, documentation, and preparing datasets for AI analysis.
19+
20+
Built by: Zachary Whiteman & Google Gemini Ai.
21+
22+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
23+
24+
<!-- GETTING STARTED -->
25+
26+
# 🔰 Getting Started
27+
This tool provides a graphical interface for batch script conversion.
28+
29+
## 🕰️ Prerequisites
30+
To run this script, you will need:
31+
32+
* **Windows Operating System.**
33+
* **PowerShell 5.1 or newer.**
34+
* **.NET Framework:** Required for the Windows Forms GUI.
35+
36+
## 💽 Installation & Execution
37+
1. **Download:** Download the `EliteScriptConverter.ps1` script file.
38+
2. **Unblock:** Right-click the file, go to Properties, and click `Unblock`.
39+
3. **Run:** Execute the script from a PowerShell console.
40+
```powershell
41+
.\EliteScriptConverter.ps1
42+
```
43+
44+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
45+
46+
## 🚀 Usage
47+
1. **Select Source:** Choose a folder containing the `.ps1` or `.py` files you want to convert.
48+
2. **Select Output:** Choose a destination folder for the converted files.
49+
3. **Choose Formats:** Select the desired output formats (JSON, TXT, XML).
50+
4. **Convert:** Click **Convert Scripts**. The tool will process the files and save them to the output directory.
51+
52+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
53+
54+
## ✨ Key Features
55+
* **Batch Conversion:** Processes multiple script files at once.
56+
* **Multiple Formats:** Supports converting to JSON, XML, and Plain Text.
57+
* **Non-Destructive:** Reads from source and writes to a separate output, leaving original files untouched.
58+
* **GUI Interface:** Easy-to-use Windows Forms interface.
59+
* **Logging:** Includes detailed logging of operations.
60+
61+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
62+
63+
## 🛠️ Technology Stack
64+
* **Scripting Language:** PowerShell
65+
* **GUI Framework:** .NET Windows Forms (WinForms).
66+
* **Data Handling:** PowerShell object serialization (`ConvertTo-Json`, `ConvertTo-Xml`).
67+
68+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
69+
70+
## 📐 Architecture & Security Notes
71+
* **Local Processing:** All conversion happens locally on your machine.
72+
* **File System Access:** Requires read access to the source directory and write access to the output directory.
73+
74+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
75+
76+
## 🪪 License
77+
Distributed under the MIT License. See LICENSE.txt for more information.
78+
79+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
80+
81+
## ☎️ Contact
82+
Zach Whiteman - elitesoftwarecolimited@gmail.com
83+
84+
HuggingFace - https://huggingface.co/EliteSoftware
85+
86+
HuggingFace (Personal) - https://huggingface.co/TheShadyRainbow
87+
88+
LinkTree - https://linktr.ee/zachrainbow
89+
90+
Patreon - https://www.patreon.com/c/EliteSoftwareCo
91+
92+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
[
2+
{
3+
"Version": "1.2.3.1",
4+
"Date": "2025-12-16",
5+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
6+
"Changes": [
7+
"Fixed alignment bug where the 'Done' button in the Changelog window was not centered."
8+
]
9+
},
10+
{
11+
"Version": "1.2.3.0",
12+
"Date": "2025-12-16",
13+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
14+
"Changes": [
15+
"Increased main form banner size and adjusted layout for better visibility.",
16+
"Replaced image banner in Changelog window with a clean, large text header.",
17+
"Updated Changelog window footer to a lighter theme with a centered 'Done' button."
18+
]
19+
},
20+
{
21+
"Version": "1.2.2.1",
22+
"Date": "2025-12-16",
23+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
24+
"Changes": [
25+
"Adjusted main form and changelog window banners to use 'Zoom' PictureBoxSizeMode.",
26+
"Ensures banner images are scaled proportionally, centered, and not stretched or clipped."
27+
]
28+
},
29+
{
30+
"Version": "1.2.2.0",
31+
"Date": "2025-12-16",
32+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
33+
"Changes": [
34+
"Replaced Markdown-to-HTML conversion with direct JSON-to-HTML generation for cleaner Changelog formatting.",
35+
"Styled Changelog with modern CSS including cards, headers, and clean lists.",
36+
"Fixed visual style of the 'Done' button in the Changelog window to match system theme."
37+
]
38+
},
39+
{
40+
"Version": "1.2.1.1",
41+
"Date": "2025-12-16",
42+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
43+
"Changes": [
44+
"Fixed Changelog window banner to be centered and not stretched, improving visual quality."
45+
]
46+
},
47+
{
48+
"Version": "1.2.1.0",
49+
"Date": "2025-12-16",
50+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
51+
"Changes": [
52+
"Enhanced Changelog GUI with HTML rendering for proper Markdown display.",
53+
"Added Banner image to the top of the Changelog window.",
54+
"Added a dark footer panel with a 'Done' button to the Changelog window."
55+
]
56+
},
57+
{
58+
"Version": "1.2.0.0",
59+
"Date": "2025-12-16",
60+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
61+
"Changes": [
62+
"Added Import Scripts button to easily copy files to Source directory.",
63+
"Added Clear Source and Clear Output buttons with safety confirmations.",
64+
"Implemented Custom Changelog GUI window with Markdown-like formatting.",
65+
"Fixed Banner image scaling (centered instead of stretched)."
66+
]
67+
},
68+
{
69+
"Version": "1.1.0.0",
70+
"Date": "2025-12-16",
71+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
72+
"Changes": [
73+
"Added EliteSoftware Company Banner to top of UI.",
74+
"Added EliteSoftware Logo to header area.",
75+
"Adjusted UI layout to accommodate new branding elements.",
76+
"Increased main window height."
77+
]
78+
},
79+
{
80+
"Version": "1.0.1.0",
81+
"Date": "2025-12-16",
82+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
83+
"Changes": [
84+
"Moved Configuration folder to Tool-Resources directory.",
85+
"Added Application Icon from Tool-Resources."
86+
]
87+
},
88+
{
89+
"Version": "1.0.0.0",
90+
"Date": "2025-12-16",
91+
"Author": "Zachary Whiteman / EliteSoftware Company / Google Gemini",
92+
"Changes": [
93+
"Initial Release.",
94+
"Implemented standard EliteSoftware Logging Module.",
95+
"Implemented WinForms GUI with Dark Theme.",
96+
"Added Source and Output directory selection.",
97+
"Added support for converting .ps1 and .py files.",
98+
"Added output formats: JSON, XML, TXT.",
99+
"Included EliteSoftware branding and slogans."
100+
]
101+
}
102+
]
1.23 MB
Loading
187 KB
Loading
Loading
Loading
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
<a id="readme-top"></a>
2+
3+
<!-- EliteSoftware Co. LOGO -->
4+
5+
<br />
6+
<div align="center">
7+
<a href="Logo">
8+
<img src="https://i.postimg.cc/85MDTcrJ/Elite-Software-LOGO-Mocup2.png" alt="Logo" width="256" height="256">
9+
</a>
10+
</div>
11+
12+
<!-- ABOUT THE PROJECT -->
13+
14+
# 💾 About The Project <div align="center">
15+
## Screenshot may be slightly outdated. Sorry in advance! :)
16+
<br />
17+
<div align="center">
18+
<a href="Screenshot">
19+
<img src="https://i.postimg.cc/Y9QyWx7m/image.png" alt="GUI Screenshot" width="1280" height="720">
20+
</a>
21+
</div>
22+
23+
EliteSoftware HTML - HTTP Test Server: A Multi-Config GUI for PowerShell
24+
25+
EliteSoftware HTML - HTTP Test Server is a compact, multi-threaded HTTP server application built entirely with PowerShell and Windows Forms (.NET WinForms). It's designed to provide developers and testers with a simple, yet robust, GUI-based platform for quickly hosting and testing local static web content (HTML, CSS, JS, etc.).
26+
27+
This tool allows you to run multiple server configurations simultaneously, each on its own thread, ensuring stability and non-blocking operation. It features a modern, themed GUI, configuration saving, dynamic port checking, and a graceful shutdown mechanism.
28+
29+
Built by: Zachary Whiteman & Google Gemini AI.
30+
31+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
32+
33+
<!-- GETTING STARTED -->
34+
35+
# 🔰 Getting Started
36+
This application is a single PowerShell script and does not require a complex installation process.
37+
38+
## 🕰️ Prerequisites
39+
To run this script, you only need:
40+
41+
Windows Operating System (Windows 7 or later).
42+
43+
PowerShell 5.1 or newer (PowerShell Core is supported, but the script is optimized for the full .NET Framework available in Windows PowerShell for WinForms).
44+
45+
The required .NET Framework assemblies (System.Windows.Forms, System.Drawing, System.Net) which are included with modern Windows installations and loaded automatically by the script.
46+
47+
## 💽 Installation & Execution
48+
Download: Download the EliteSoftware HTML - HTTP Test Server.PS1 script file.
49+
50+
Unblock: Right-click the file, go to Properties, and click Unblock if the file was downloaded from the internet (a common necessity for scripts downloaded from the web).
51+
52+
Run: Execute the script from a PowerShell console or by double-clicking it (if your system is configured to run PS1 files).
53+
54+
.\EliteSoftware HTML - HTTP Test Server.PS1
55+
56+
The application's configuration files and custom icon (if present) are stored in:
57+
C:\Users\<YourUser>\AppData\Roaming\EliteSoftware\HTML_HTTP_TEST_SERVER
58+
59+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
60+
61+
## 🚀 Usage
62+
The application is designed for rapid local testing via a simple three-step process:
63+
64+
Configure: In the main control panel, specify the Server Root Folder (where your HTML/CSS/JS files are located) and the desired Server Port (e.g., 8080).
65+
66+
Start: Click the "Start Server" button. The application will automatically check for port availability and launch the server on a dedicated thread.
67+
68+
Test: Click the "Open in Browser" button to immediately launch the hosted URL in your default web browser, allowing you to test your content instantly.
69+
70+
Use the left sidebar to save and switch between up to 10 distinct server configurations instantly.
71+
72+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
73+
74+
## ✨ Key Features
75+
This application leverages PowerShell WinForms and multi-threading for a fully-featured desktop experience:
76+
77+
Multi-Server Configuration UI: Manage up to 10 distinct server setups with their own root paths, default files, and ports via an intuitive sidebar and configuration list.
78+
79+
Multi-Threaded HTTP Server: The server logic uses the robust System.Net.HttpListener on a separate background thread, ensuring the GUI remains responsive while handling incoming requests.
80+
81+
Dynamic Port Resolution: Automatically detects and increments the server port by +1 if the specified port is already in use, preventing startup conflicts.
82+
83+
Detailed Real-Time Logging: Logs all successful (200), 404 Not Found, and 500 Server Error requests to the GUI console in real-time. Logs include file size (in KB), client IP, and HTTP method.
84+
85+
Graceful Shutdown: Implements an explicit shutdown routine for all active servers and includes a custom, themed "Goodbye" popup window on exit, ensuring no lingering processes.
86+
87+
Configuration Persistence: Automatically saves and loads all server settings (up to 10 configs) to a JSON file in your AppData folder, maintaining your workflow across sessions.
88+
89+
Browser Integration: Includes a one-click button to open the hosted server URL in the default web browser.
90+
91+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
92+
93+
## 🛠️ Technology Stack
94+
The entire application is a self-contained PowerShell script, utilizing:
95+
96+
Scripting Language: PowerShell (5.1+)
97+
98+
GUI Framework: .NET Windows Forms (WinForms)
99+
100+
Core HTTP Service: System.Net.HttpListener (a high-performance, built-in Windows HTTP service)
101+
102+
Threading: System.Threading.Thread for non-blocking server operation.
103+
104+
GUI Styling: Uses [System.Windows.Forms.Application]::EnableVisualStyles() and System.Drawing.Drawing2D for custom, system-themed buttons and gradient headers.
105+
106+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
107+
108+
## 📐 Architecture & Security Notes
109+
110+
This application is built as a highly specialized, local-only test environment. Understanding its architecture is key to proper usage and security:
111+
112+
### 🌎 Local-Only Server (HttpListener)
113+
The core server functionality is provided by the `.NET System.Net.HttpListener` class. This class is highly optimized for lightweight serving and is configured to:
114+
* **Prevent Global Access:** The default IP address binding is set to `127.0.0.1` (localhost) to ensure the server is not accidentally accessible from external network connections. This is crucial for security when testing local files.
115+
* **Static Content Only:** The server is designed exclusively to serve static files (HTML, CSS, JavaScript, images, etc.). It does **not** execute any server-side scripts (like PHP or ASP.NET) and is safe to use for testing front-end components.
116+
117+
### 🔄️ Threading Model
118+
The GUI runs on the main PowerShell thread, while the `HttpListener` operates on a separate, dedicated `System.Threading.Thread`. This architecture ensures:
119+
* **Non-Blocking UI:** The user interface remains responsive to clicks and input, even while the server is busy handling requests.
120+
* **Graceful Exit:** The script uses a global flag (`$Script:IsExiting`) and explicit `Stop()` calls on the listener to guarantee that the server threads are terminated cleanly when the application window is closed.
121+
122+
### 🗃️ Data Handling
123+
Configuration data for up to 10 servers (root path, port, default file) is stored locally as a simple JSON file in the designated AppData directory. No external connections or databases are used for configuration or logging.
124+
125+
<!-- LICENSE -->
126+
127+
## 🪪 License
128+
Distributed under the MIT License. See LICENSE.txt for more information.
129+
130+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
131+
132+
<!-- CONTACT -->
133+
134+
## ☎️ Contact
135+
Zach Whiteman - elitesoftwarecolimited@gmail.com
136+
137+
HuggingFace - https://huggingface.co/EliteSoftware
138+
139+
HuggingFace (Personal) - https://huggingface.co/TheShadyRainbow
140+
141+
LinkTree - https://linktr.ee/zachrainbow
142+
143+
Patreon - https://www.patreon.com/c/EliteSoftwareCo
144+
145+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Settings>
2+
<HideConsole>False</HideConsole>
3+
<OpenExplorer>True</OpenExplorer>
4+
<LastSaveDir>G:\New Computer Setup\All System32 Icons 04112025\Downloaded</LastSaveDir>
5+
</Settings>

0 commit comments

Comments
 (0)