# Confluence Bot Configuration # Edit these values for your Confluence instance $ConfluenceUrl = "https://your-confluence.example.com" $SpaceKey = "YOUR_SPACE" $RootPageId = "123456789" # Root page ID to work under $ApiBase = "$ConfluenceUrl/rest/api" $PerPage = 50 # Output directories $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $ProjectDir = Split-Path -Parent $ScriptDir $OutputDir = Join-Path $ProjectDir "data/export" $PagesDir = Join-Path $ProjectDir "pages" # TLS [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Load token from .secrets $SecretsPath = Join-Path $ProjectDir ".secrets" $PAT = $null if (Test-Path $SecretsPath) { Get-Content $SecretsPath | ForEach-Object { if ($_ -match "^CONFLUENCE_TOKEN=(.+)$") { $val = $Matches[1].Trim() if ($val -ne "your_personal_access_token_here") { $PAT = $val } } } } if (-not $PAT) { $PAT = Read-Host "Confluence Personal Access Token" } $Headers = @{ "Authorization" = "Bearer $PAT"; "Content-Type" = "application/json" }