Files
odoo-expertos.com/seo-audit-2026-05-27/scripts/w1-cleanup.ps1
T
2026-08-28 10:11:11 -03:00

17 lines
901 B
PowerShell

$slugs = 'bestes-odoo-hosting-2026|cheap-odoo-hosting-2026|kostenloses-odoo-hosting-2026|odoo-hosting-deutschland-2026|odoo-hosting-oesterreich-2026|odoo-hosting-schweiz-2026|best-odoo-hosting-2026|free-odoo-hosting-2026|odoo-hosting-germany-2026|odoo-hosting-uk-2026|odoo-sh-alternatives-2026|odoo-vps-hosting-2026'
$repo = Split-Path -Parent $PSScriptRoot
$repo = Split-Path -Parent $repo
foreach ($f in @('sitemap-en.xml','sitemap-fr.xml','sitemap-pt.xml','sitemap-ar.xml')) {
$path = Join-Path $repo $f
if (-not (Test-Path $path)) { continue }
$c = [System.IO.File]::ReadAllText($path)
$re = '(?s)\s*<url>\s*<loc>https://www\.odoo-expertos\.com/(en|fr|pt|ar)/odoo-hosting/(' + $slugs + ')/</loc>.*?</url>'
$new = [regex]::Replace($c, $re, '')
if ($new -ne $c) {
[System.IO.File]::WriteAllText($path, $new)
Write-Host "Cleaned $f"
} else {
Write-Host "No change $f"
}
}