diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-07-12 23:03:42 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2018-07-12 23:03:42 +0200 |
commit | 1eb59a5d9eedcb2fde4cfcd8f3cf87edf18e71e4 (patch) | |
tree | 4d3a9112d9887ea16ab5dda07a7a791f15d3278f /tools/oregano-convert |
New upstream version 0.70
Diffstat (limited to 'tools/oregano-convert')
-rwxr-xr-x | tools/oregano-convert | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/oregano-convert b/tools/oregano-convert new file mode 100755 index 0000000..a6251f3 --- /dev/null +++ b/tools/oregano-convert @@ -0,0 +1,31 @@ +#!/usr/bin/perl + +# Fix the namespace. +while (<>) { + if (/<schematic/) { + s/</<ogo:/; + s/>/ xmlns:ogo="http:\/\/www.dtek.chalmers.se\/~d4hult\/oregano\/v1">/; + print; + last; + } + + if (/<schematic/) { + print; + last; + } + + print; +} + +# Add namespace to tags. +while (<>) { + + if (/<[a-zA-Z]/) { + s/</<ogo:/; + } + + s/<\//<\/ogo:/; + print; +} + + |