add script to convert URLs to elixForms format

This commit is contained in:
2026-05-26 16:01:45 +02:00
parent e116dff5cf
commit 292975031a
4 changed files with 126 additions and 8 deletions
+26
View File
@@ -0,0 +1,26 @@
@echo off
SETLOCAL EnableDelayedExpansion
echo %cmdcmdline% | findstr /i /c:"%~nx0" >NUL && set iscommandline=1
echo %PSModulePath% | findstr /i /c:"%USERPROFILE%" >NUL && set ispowershell=1
cd /D "%~dp0"
SET UrlToConvert=
IF "%~1"=="" (
echo Absolute URL not specified.
set /p UrlToConvert=Insert absolute URL to convert:
IF "!UrlToConvert!"=="" (
echo Absolute URL is required!
exit /b 1
) ELSE (
echo Using absolute URL: !UrlToConvert!
set AbsoluteUrl="!UrlToConvert!"
)
) ELSE (
echo Using absolute URL: %~1
set AbsoluteUrl=%~1
)
@powershell -NoProfile -ExecutionPolicy Bypass -Command .\scripts\convert-url-to-elix.ps1 -AbsoluteUrl '%AbsoluteUrl%'
IF DEFINED iscommandline IF NOT DEFINED ispowershell pause
ENDLOCAL