Skip to content

Commit 30ce5c7

Browse files
authored
Update powershell script to use user inputs
1 parent 77fd431 commit 30ce5c7

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

runParser.ps1

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# Define the paths to the parser script and the parent directory containing Eluna API HTML files
2-
$parserScriptPath = "C:\Users\foereaper\Desktop\luaLS\LuaLS-Eluna-Parser\parser.py"
3-
$htmlParentDirectory = "C:\Users\foereaper\Desktop\tc\elunatrinitywotlk\src\server\game\LuaEngine\docs\build"
1+
# Check if the required number of arguments is provided
2+
if ($Args.Count -lt 3) {
3+
Write-Host "Usage: runParser.ps1 <parserScriptPath> <htmlParentDirectory> <outputDirectory> [debug(false)]"
4+
exit 1
5+
}
46

5-
# Define the output directory for the LuaLS workspace
6-
$outputDirectory = "C:\Users\foereaper\Desktop\luaLS\LuaLS-Eluna-Parser\build"
7+
$parserScriptPath = $Args[0] # Path to parser.py
8+
$htmlParentDirectory = $Args[1] # Path to ElunaLuaEngine.github.io repository
9+
$outputDirectory = $Args[2] # Path to output directory
10+
$debug = $false # Default debug value
711

8-
$debug = $false
12+
if ($Args.Count -ge 4) {
13+
$debug = [bool]$Args[3]
14+
}
915

1016
# Define the list of subdirectories to process
1117
$subdirectories = @("Aura", "BattleGround", "Corpse", "Creature", "ElunaQuery", "GameObject", "Group", "Guild", "Global", "Item", "Map", "Object", "Player", "Quest", "Spell", "Unit", "Vehicle", "WorldObject", "WorldPacket")
@@ -14,4 +20,4 @@ $subdirectories = @("Aura", "BattleGround", "Corpse", "Creature", "ElunaQuery",
1420
foreach ($subdir in $subdirectories) {
1521
$htmlDirectory = Join-Path -Path $htmlParentDirectory -ChildPath $subdir
1622
python $parserScriptPath $htmlDirectory $outputDirectory $debug
17-
}
23+
}

0 commit comments

Comments
 (0)