Menu Launcher

This commit is contained in:
2026-02-09 11:19:43 +00:00
parent aafb27e777
commit 7ea9375028

View File

@@ -1,6 +1,6 @@
@echo off @echo off
REM === Portex Menu Launcher === REM === HyperCLI Menu Launcher ===
REM Repository: https://git.weektab.org/nexus/portex REM Repository: https://git.weektab.org/nexus/HyperCLI
REM Powered by Weektab REM Powered by Weektab
REM Author: Flamur Veliqi (Netbie) REM Author: Flamur Veliqi (Netbie)
@@ -8,13 +8,13 @@ setlocal enabledelayedexpansion
:MAIN_MENU :MAIN_MENU
cls cls
echo Portex Menu Launcher echo HyperCLI Menu Launcher
echo. echo.
echo Powered by Weektab echo Powered by Weektab
echo Web: www.weektab.org echo Web: www.weektab.org
echo E-Mail: support@weektab.org echo E-Mail: support@weektab.org
echo Project: Portex echo Project: HyperCLI
echo Repository: git.weektab.org/nexus/portex echo Repository: git.weektab.org/nexus/HyperCLI
echo. echo.
echo ////////////////////////////////////////////////// echo //////////////////////////////////////////////////
echo. echo.
@@ -48,13 +48,13 @@ goto MAIN_MENU
:MENU :MENU
cls cls
echo Portex Menu Launcher - !CATEGORY_NAME! echo HyperCLI Menu Launcher - !CATEGORY_NAME!
echo. echo.
echo Powered by Weektab echo Powered by Weektab
echo Web: www.weektab.org echo Web: www.weektab.org
echo E-Mail: support@weektab.org echo E-Mail: support@weektab.org
echo Project: Portex echo Project: HyperCLI
echo Repository: git.weektab.org/nexus/portex echo Repository: git.weektab.org/nexus/HyperCLI
echo Author: Flamur Veliqi (Netbie) echo Author: Flamur Veliqi (Netbie)
echo. echo.
echo ////////////////////////////////////////////////// echo //////////////////////////////////////////////////
@@ -63,7 +63,7 @@ echo Scanning /!SCRIPT_PATH! directory...
echo. echo.
REM Use Gitea API to list files in selected directory REM Use Gitea API to list files in selected directory
powershell -Command "$ProgressPreference = 'SilentlyContinue'; try { $response = Invoke-RestMethod -Uri 'https://git.weektab.org/api/v1/repos/nexus/portex/contents/!API_PATH!'; $batFiles = $response | Where-Object { $_.name -like '*.bat' } | Select-Object -ExpandProperty name | Sort-Object; if ($batFiles) { $batFiles | Out-File '%TEMP%\repo_scripts.txt' -Encoding ASCII -NoNewline:$false } else { 'NONE' | Out-File '%TEMP%\repo_scripts.txt' -Encoding ASCII } } catch { 'ERROR' | Out-File '%TEMP%\repo_scripts.txt' -Encoding ASCII }" 2>nul powershell -Command "$ProgressPreference = 'SilentlyContinue'; try { $response = Invoke-RestMethod -Uri 'https://git.weektab.org/api/v1/repos/nexus/HyperCLI/contents/!API_PATH!'; $batFiles = $response | Where-Object { $_.name -like '*.bat' } | Select-Object -ExpandProperty name | Sort-Object; if ($batFiles) { $batFiles | Out-File '%TEMP%\repo_scripts.txt' -Encoding ASCII -NoNewline:$false } else { 'NONE' | Out-File '%TEMP%\repo_scripts.txt' -Encoding ASCII } } catch { 'ERROR' | Out-File '%TEMP%\repo_scripts.txt' -Encoding ASCII }" 2>nul
if not exist "%TEMP%\repo_scripts.txt" ( if not exist "%TEMP%\repo_scripts.txt" (
echo ERROR: Unable to access repository API echo ERROR: Unable to access repository API
@@ -94,7 +94,7 @@ if "%FIRST_LINE%"=="NONE" (
REM Get all script titles in one PowerShell call REM Get all script titles in one PowerShell call
echo Extracting list... echo Extracting list...
echo. echo.
powershell -Command "$ProgressPreference = 'SilentlyContinue'; try { $files = Get-Content '%TEMP%\repo_scripts.txt'; $results = @(); foreach ($file in $files) { if ($file -and $file -ne '' -and $file -ne 'NONE' -and $file -ne 'ERROR') { try { $url = 'https://git.weektab.org/nexus/portex/raw/branch/main/!SCRIPT_PATH!/' + $file; $content = (Invoke-WebRequest -Uri $url -UseBasicParsing).Content; if ($content -match 'REM\s*===\s*(.+?)\s*===') { $results += $file + '|' + $matches[1] } else { $results += $file + '|' } } catch { $results += $file + '|' } } }; $results | Out-File '%TEMP%\repo_titles.txt' -Encoding ASCII } catch { }" 2>nul powershell -Command "$ProgressPreference = 'SilentlyContinue'; try { $files = Get-Content '%TEMP%\repo_scripts.txt'; $results = @(); foreach ($file in $files) { if ($file -and $file -ne '' -and $file -ne 'NONE' -and $file -ne 'ERROR') { try { $url = 'https://git.weektab.org/nexus/HyperCLI/raw/branch/main/!SCRIPT_PATH!/' + $file; $content = (Invoke-WebRequest -Uri $url -UseBasicParsing).Content; if ($content -match 'REM\s*===\s*(.+?)\s*===') { $results += $file + '|' + $matches[1] } else { $results += $file + '|' } } catch { $results += $file + '|' } } }; $results | Out-File '%TEMP%\repo_titles.txt' -Encoding ASCII } catch { }" 2>nul
REM Display menu REM Display menu
set INDEX=0 set INDEX=0
@@ -156,7 +156,7 @@ cls
echo /// Executing: !DISPLAY[%CHOICE%]! echo /// Executing: !DISPLAY[%CHOICE%]!
echo. echo.
set "SCRIPT_URL=https://git.weektab.org/nexus/portex/raw/branch/main/!SCRIPT_PATH!/!SCRIPT_NAME[%CHOICE%]!" set "SCRIPT_URL=https://git.weektab.org/nexus/HyperCLI/raw/branch/main/!SCRIPT_PATH!/!SCRIPT_NAME[%CHOICE%]!"
set "TEMP_SCRIPT=%TEMP%\batch_script_%RANDOM%.bat" set "TEMP_SCRIPT=%TEMP%\batch_script_%RANDOM%.bat"
echo Downloading script... echo Downloading script...