Last active
August 19, 2019 08:20
A quick workaround to move all uSync macro keys from a node to an attribute (see https://github.com/KevinJump/uSync/issues/231) - just place in the uSync\data\macro folder and run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all .config files in the current folder | |
Get-ChildItem "./" -Filter *.config | | |
Foreach-Object { | |
[xml]$xml = Get-Content $_.FullName | |
# Add Key attribute | |
$macroNode = $xml.SelectSingleNode("macro") | |
$macroNode.SetAttribute("Key", $xml.macro.Key) | |
# Remove Key node | |
$keyNode = $xml.SelectSingleNode("macro/Key") | |
$macroNode.RemoveChild($keyNode) | |
$xml.Save($_.FullName) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment