Created
September 26, 2015 04:01
-
-
Save smellman/7ebd23beb938cefce4f2 to your computer and use it in GitHub Desktop.
One Liner to get raster-colorizer-stops tags from QGIS's qml file.
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
# patternEntry to stop(value, color) | |
grep paletteEntry test1.qml|sed -e "s/^.*<paletteEntry value=//g"|sed -e "s/label=.*$//g"|sed -e "s/color=//g"|sed -e "s/^\"/stop\(/g"|sed -e "s/\"\ \"/,\ /g"|sed -e "s/\".*$/\)/g" | |
# item to stop(value, color) (not support alpha value) | |
grep item test2.qml|sed -e "s/^.*<item.* value=//g"|sed -e "s/label=.*\ //g"|sed -e "s/color=//g"|sed -e "s/^\"/stop\(/g"|sed -e "s/\"\ \"/,\ /g"|sed -e "s/\"\/\>.*$/\)/g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment