Menu Launcher
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
REM === Portex Menu Launcher ===
|
||||
REM Repository: https://git.weektab.org/nexus/portex
|
||||
REM === HyperCLI Menu Launcher ===
|
||||
REM Repository: https://git.weektab.org/nexus/HyperCLI
|
||||
REM Powered by Weektab
|
||||
REM Author: Flamur Veliqi (Netbie)
|
||||
|
||||
@@ -8,13 +8,13 @@ setlocal enabledelayedexpansion
|
||||
|
||||
:MAIN_MENU
|
||||
cls
|
||||
echo Portex Menu Launcher
|
||||
echo HyperCLI Menu Launcher
|
||||
echo.
|
||||
echo Powered by Weektab
|
||||
echo Web: www.weektab.org
|
||||
echo E-Mail: support@weektab.org
|
||||
echo Project: Portex
|
||||
echo Repository: git.weektab.org/nexus/portex
|
||||
echo Project: HyperCLI
|
||||
echo Repository: git.weektab.org/nexus/HyperCLI
|
||||
echo.
|
||||
echo //////////////////////////////////////////////////
|
||||
echo.
|
||||
@@ -48,13 +48,13 @@ goto MAIN_MENU
|
||||
|
||||
:MENU
|
||||
cls
|
||||
echo Portex Menu Launcher - !CATEGORY_NAME!
|
||||
echo HyperCLI Menu Launcher - !CATEGORY_NAME!
|
||||
echo.
|
||||
echo Powered by Weektab
|
||||
echo Web: www.weektab.org
|
||||
echo E-Mail: support@weektab.org
|
||||
echo Project: Portex
|
||||
echo Repository: git.weektab.org/nexus/portex
|
||||
echo Project: HyperCLI
|
||||
echo Repository: git.weektab.org/nexus/HyperCLI
|
||||
echo Author: Flamur Veliqi (Netbie)
|
||||
echo.
|
||||
echo //////////////////////////////////////////////////
|
||||
@@ -63,7 +63,7 @@ echo Scanning /!SCRIPT_PATH! directory...
|
||||
echo.
|
||||
|
||||
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" (
|
||||
echo ERROR: Unable to access repository API
|
||||
@@ -94,7 +94,7 @@ if "%FIRST_LINE%"=="NONE" (
|
||||
REM Get all script titles in one PowerShell call
|
||||
echo Extracting list...
|
||||
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
|
||||
set INDEX=0
|
||||
@@ -156,7 +156,7 @@ cls
|
||||
echo /// Executing: !DISPLAY[%CHOICE%]!
|
||||
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"
|
||||
|
||||
echo Downloading script...
|
||||
Reference in New Issue
Block a user