i'm noob :( #201

This commit is contained in:
varlesh 2016-12-07 15:18:28 +04:00
parent 7cf119ec05
commit 163f0ea474
3 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="22"
width="22"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="_papirus_template_chang.svg">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1600"
inkscape:window-height="843"
id="namedview8"
showgrid="false"
inkscape:zoom="10.727273"
inkscape:cx="-26.847458"
inkscape:cy="11"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<defs
id="papirus">
<style
type="text/css"
id="current-color-scheme">
.ColorScheme-Text { color:#5c616c; } .ColorScheme-Highlight { color:#5294e2; } .ColorScheme-ButtonBackground { color:#d3dae3; }
</style>
</defs>
<path
inkscape:connector-curvature="0"
class="ColorScheme-ButtonBackground"
id="path6"
d="m 1,3 0,16 16,0 0,-7.5 -2,2 L 15,17 3,17 3,5 15,5 15,8 17,6 17,3 1,3 Z"
style="fill:#d3dae3" />
<path
inkscape:connector-curvature="0"
class="ColorScheme-Highlight"
id="path8"
d="m 19.35,5.07 -7.0254,7.1348 -4.9414,-5 -1.3848,1.4043 4.9434,5.002 1.3711,1.3906 1.3828,-1.4062 L 20.723,6.4607 19.35,5.0701 Z"
style="color:#5294e2;fill:currentColor" />
<path
style="color:#d3dae3;fill:currentColor"
d="m 1,-1 0,16 16,0 0,-7.5 -2,2 0,3.5 -12,0 0,-12 12,0 0,3 2,-2 0,-3 -16,0 z"
id="path4140"
class="ColorScheme-ButtonBackground"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:#d3dae3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 21.81356,18.597458 a 2.3305085,2.8432202 0 0 1 -2.330509,2.84322 2.3305085,2.8432202 0 0 1 -2.330508,-2.84322 2.3305085,2.8432202 0 0 1 2.330508,-2.84322 2.3305085,2.8432202 0 0 1 2.330509,2.84322 z"
id="path4142" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,19 @@
#!/bin/bash
# Papirus stylesheet
export SVGPAPIRUS=`ls | grep _p.svg`
# add classes
xmlstarlet ed --subnode "//*/*[contains(@style, '${colors[i]}') and not (@class)]" -t attr -n "class" -v "${colorNames[i]}" $SVGPAPIRUS > $SVGPAPIRUS.temp
sed -i 's|class=""/>|/>|g' $SVGPAPIRUS.temp
sed -i 's|class="">|>|g' $SVGPAPIRUS.temp
mv $SVGPAPIRUS.temp $SVGPAPIRUS
# remove colors
sed -i 's|"color:#5c616c;|"|g' $SVGPAPIRUS
sed -i 's|"color:#5294e2;|"|g' $SVGPAPIRUS
sed -i 's|"color:#d3dae3;|"|g' $SVGPAPIRUS
sed -i 's|color:#5c616c;"|"|g' $SVGPAPIRUS
sed -i 's|color:#5294e2;"|"|g' $SVGPAPIRUS
sed -i 's|color:#d3dae3;"|"|g' $SVGPAPIRUS
# replace fill
sed -i 's/fill:#5c616c/fill:currentColor/g' $SVGPAPIRUS
sed -i 's/fill:#5294e2/fill:currentColor/g' $SVGPAPIRUS
sed -i 's/fill:#d3dae3/fill:currentColor/g' $SVGPAPIRUS